.sacred-core-page {
  background: #f7f9f8;
}

.sc-hero {
  color: #f4f7f5;
  background: var(--deep);
}

.sc-hero-grid,
.sc-guided-grid,
.sc-explorer-heading,
.sc-reading-grid,
.sc-chain-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: 64px;
}

.sc-hero-grid {
  min-height: 560px;
  padding-top: 112px;
  padding-bottom: 96px;
  align-items: end;
}

.sc-hero .section-kicker,
.sc-explorer .section-kicker {
  color: var(--gold-soft);
}

.sc-hero h1,
.sc-explorer h2,
.sc-reading-guide h2,
.sc-chain h2,
.sc-inspector h3 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}

.sc-hero h1 {
  max-width: 980px;
  font-size: clamp(4.3rem, 8vw, 7.5rem);
  line-height: 0.92;
}

.sc-hero-lede {
  max-width: 760px;
  margin: 36px 0 0;
  color: #c5d2cc;
  font-size: 1rem;
  line-height: 1.75;
}

.sc-hero-note {
  max-width: 760px;
  margin: 22px 0 0;
  padding-top: 18px;
  color: var(--gold-soft);
  border-top: 1px solid rgba(228, 210, 155, 0.24);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.64rem;
  line-height: 1.55;
  text-transform: uppercase;
}

.sc-totals {
  color: #f4f7f5;
  background: var(--forest);
}

.sc-total-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sc-total-grid > div {
  min-height: 126px;
  padding: 28px 24px;
  display: grid;
  align-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.sc-total-grid > div:first-child {
  padding-left: 0;
}

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

.sc-total-grid strong {
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1;
}

.sc-total-grid span {
  margin-top: 9px;
  color: #9fb3aa;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
}

.sc-guided {
  padding: 92px 0 96px;
  border-bottom: 1px solid var(--rule);
  background: #fff;
}

.sc-guided-alt {
  background: #f1f5f2;
}

.sc-guided-alt .sc-guided-path li:not(:last-child)::after {
  background: #f1f5f2;
}

.sc-guided-grid {
  grid-template-columns: minmax(150px, 0.3fr) minmax(0, 0.92fr) minmax(340px, 0.78fr);
}

.sc-guided h2 {
  max-width: 720px;
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 3.45rem;
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: 0;
}

.sc-guided-copy > p {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.sc-guided-metrics {
  max-width: 540px;
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.sc-guided-metrics > div {
  min-height: 94px;
  padding: 20px 22px 18px 0;
}

.sc-guided-metrics > div + div {
  padding-left: 22px;
  border-left: 1px solid var(--rule);
}

.sc-guided-metrics strong,
.sc-guided-metrics span {
  display: block;
}

.sc-guided-metrics strong {
  color: var(--green);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.sc-guided-metrics span {
  margin-top: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  line-height: 1.45;
  text-transform: uppercase;
}

.sc-guided-action {
  margin-top: 28px;
  padding: 0 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--green);
  border: 0;
  border-bottom: 1px solid var(--gold);
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.sc-guided-action:disabled {
  color: var(--muted);
  border-bottom-color: var(--rule);
  cursor: wait;
}

.sc-guided-action:not(:disabled):hover,
.sc-guided-action:not(:disabled):focus-visible {
  color: var(--ink);
  outline: 0;
}

.sc-guided-path {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.sc-guided-path li {
  position: relative;
  min-height: 138px;
  padding: 22px 0 24px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--rule);
}

.sc-guided-path li:not(:last-child)::after {
  position: absolute;
  bottom: -10px;
  left: 13px;
  z-index: 2;
  color: var(--gold);
  background: #fff;
  content: "↓";
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.66rem;
}

.sc-guided-path li > span {
  color: var(--gold);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.54rem;
}

.sc-guided-path strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.sc-guided-path p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.sc-explorer {
  padding: 94px 0 110px;
  color: #eef4f1;
  background: #07140f;
}

.sc-explorer-heading h2,
.sc-reading-guide h2,
.sc-chain h2 {
  max-width: 920px;
  font-size: 3.5rem;
  line-height: 1.02;
}

.sc-explorer-heading > div > p,
.sc-reading-copy > p,
.sc-chain-grid > div > p {
  max-width: 760px;
  margin: 24px 0 0;
  color: #98aca3;
  font-size: 0.9rem;
  line-height: 1.75;
}

.sc-workspace {
  width: min(calc(100% - 32px), 1480px);
  margin: 54px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #091a13;
}

.sc-toolbar {
  min-height: 96px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 28px;
  align-items: end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sc-search-wrap {
  position: relative;
}

.sc-search-wrap > label,
.sc-view-control > span {
  margin-bottom: 8px;
  display: block;
  color: #81978d;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  text-transform: uppercase;
}

.sc-search-field {
  height: 42px;
  max-width: 520px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.sc-search-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(199, 164, 90, 0.16);
}

.sc-search-field > span {
  padding-left: 13px;
  color: var(--gold-soft);
  font-size: 1.05rem;
}

.sc-search-field input {
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
}

.sc-search-field input::placeholder {
  color: #6f857b;
}

.sc-search-clear,
.sc-reset,
.sc-segmented button {
  color: #a9bbb3;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.sc-search-clear {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}

.sc-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: min(520px, 100%);
  max-height: 330px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #10251b;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.sc-search-result {
  width: 100%;
  min-height: 52px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
  color: #eef4f1;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sc-search-result:hover,
.sc-search-result:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: 0;
}

.sc-search-result span {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-search-result small {
  color: var(--gold-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.48rem;
  text-transform: uppercase;
}

.sc-search-empty {
  margin: 0;
  padding: 16px;
  color: #8fa299;
  font-size: 0.72rem;
}

.sc-segmented {
  height: 42px;
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sc-segmented button {
  min-width: 116px;
  padding: 0 14px;
  font-size: 0.67rem;
}

.sc-segmented button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sc-segmented button[aria-pressed="true"] {
  color: #081a13;
  background: var(--gold-soft);
}

.sc-reset {
  height: 42px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.67rem;
  white-space: nowrap;
}

.sc-reset:hover,
.sc-reset:focus-visible,
.sc-search-clear:hover,
.sc-search-clear:focus-visible {
  color: #fff;
  outline: 0;
}

.sc-type-bar {
  min-height: 54px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sc-type-bar label {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9eb1a8;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.54rem;
  text-transform: uppercase;
  cursor: pointer;
}

.sc-type-bar input {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sc-type-bar i {
  width: 9px;
  height: 9px;
  display: block;
  border: 1px solid currentColor;
  background: transparent;
}

.sc-type-bar input:checked + i {
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}

.sc-type-bar label:focus-within {
  color: #fff;
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

.sc-type-bar strong {
  color: #e8efeb;
  font-weight: 500;
}

.sc-type-bar .is-actor { color: #d6b66d; }
.sc-type-bar .is-event { color: #b9685c; }
.sc-type-bar .is-institution { color: #54a77e; }
.sc-type-bar .is-place { color: #78a8c4; }
.sc-type-bar .is-artifact { color: #dfd7c3; }

.sc-stage {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.sc-canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 690px;
  overflow: hidden;
  background-color: #07140f;
  background-image: radial-gradient(circle at center, rgba(46, 112, 82, 0.08), transparent 58%);
  cursor: grab;
  touch-action: none;
}

.sc-canvas-wrap.is-dragging {
  cursor: grabbing;
}

#sc-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sc-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #eef4f1;
  background: #07140f;
  text-align: center;
}

[data-state="ready"] .sc-loading,
[data-state="error"] .sc-loading-mark {
  display: none;
}

.sc-loading-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  display: block;
  border: 1px solid rgba(228, 210, 155, 0.24);
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  animation: sc-spin 1.2s linear infinite;
}

.sc-loading strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.sc-loading small {
  margin-top: 9px;
  color: #7f948a;
  font-size: 0.68rem;
}

.sc-canvas-status,
.sc-zoom-readout {
  position: absolute;
  z-index: 5;
  bottom: 16px;
  padding: 7px 9px;
  color: #8fa299;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 20, 15, 0.82);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
  pointer-events: none;
}

.sc-canvas-status {
  left: 16px;
}

.sc-zoom-readout {
  right: 16px;
}

.sc-inspector {
  min-width: 0;
  padding: 30px 26px;
  overflow: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c2118;
}

.sc-inspector h3 {
  margin-top: 18px;
  color: #fff;
  font-size: 2rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.sc-inspector-empty > p:last-child,
.sc-inspector-summary {
  margin: 20px 0 0;
  color: #8fa299;
  font-size: 0.78rem;
  line-height: 1.7;
}

.sc-record-type {
  margin: 0;
  color: var(--gold-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.56rem;
  text-transform: uppercase;
}

.sc-inspector-metrics {
  margin: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sc-inspector-metrics > div {
  min-height: 72px;
  padding: 16px 0;
}

.sc-inspector-metrics > div + div {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.sc-inspector-metrics strong,
.sc-inspector-metrics span {
  display: block;
}

.sc-inspector-metrics strong {
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.sc-inspector-metrics span {
  margin-top: 5px;
  color: #789087;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.48rem;
  text-transform: uppercase;
}

.sc-inspector-heading {
  margin: 28px 0 12px;
  color: #8fa299;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  text-transform: uppercase;
}

.sc-relationship-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sc-relationship-list li {
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sc-relationship-list button {
  width: 100%;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sc-relationship-list button:hover strong,
.sc-relationship-list button:focus-visible strong {
  color: var(--gold-soft);
}

.sc-relationship-list button:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

.sc-relationship-list strong,
.sc-relationship-list span {
  display: block;
}

.sc-relationship-list strong {
  color: #eaf1ed;
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.35;
}

.sc-relationship-list span {
  margin-top: 4px;
  color: #769087;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.46rem;
  line-height: 1.4;
  text-transform: uppercase;
}

.sc-more-relationships {
  margin: 10px 0 0;
  color: var(--gold-soft);
  font-size: 0.65rem;
}

.sc-reading-guide {
  padding: 100px 0;
  background: #fff;
}

.sc-reading-grid {
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 0.92fr) minmax(310px, 0.76fr);
}

.sc-reading-copy > p {
  color: var(--muted);
}

.sc-reading-principles {
  border-top: 1px solid var(--ink);
}

.sc-reading-principles > div {
  padding: 20px 0 22px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 6px 10px;
  border-bottom: 1px solid var(--rule);
}

.sc-reading-principles > div > span {
  color: var(--gold);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
}

.sc-reading-principles strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.sc-reading-principles p {
  grid-column: 2;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.sc-chain {
  padding: 96px 0 104px;
  color: #f4f7f5;
  background: var(--forest);
}

.sc-chain .section-kicker {
  color: var(--gold-soft);
}

.sc-chain-grid {
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 0.85fr) minmax(330px, 0.83fr);
}

.sc-chain-flow {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  list-style: none;
}

.sc-chain-flow li {
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sc-chain-flow span {
  color: var(--gold-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
}

.sc-chain-flow strong {
  font-size: 0.75rem;
  font-weight: 500;
}

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

@media (max-width: 1100px) {
  .sc-stage {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  .sc-reading-grid,
  .sc-guided-grid,
  .sc-chain-grid {
    grid-template-columns: minmax(130px, 0.25fr) minmax(0, 1fr);
  }

  .sc-reading-principles,
  .sc-guided-path,
  .sc-chain-flow {
    grid-column: 2;
    margin-top: 34px;
  }
}

@media (max-width: 820px) {
  .sc-hero-grid,
  .sc-guided-grid,
  .sc-explorer-heading,
  .sc-reading-grid,
  .sc-chain-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .sc-hero-grid {
    min-height: 0;
    padding-top: 88px;
    padding-bottom: 72px;
  }

  .sc-hero h1 {
    font-size: 4.1rem;
  }

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

  .sc-total-grid > div,
  .sc-total-grid > div:first-child {
    min-height: 104px;
    padding: 22px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .sc-total-grid > div:nth-child(2) {
    border-right: 0;
  }

  .sc-explorer {
    padding-top: 68px;
    padding-bottom: 76px;
  }

  .sc-guided {
    padding-top: 68px;
    padding-bottom: 72px;
  }

  .sc-guided h2 {
    font-size: 2.8rem;
  }

  .sc-guided-path {
    grid-column: auto;
    margin-top: 18px;
  }

  .sc-explorer-heading h2,
  .sc-reading-guide h2,
  .sc-chain h2 {
    font-size: 2.8rem;
  }

  .sc-workspace {
    margin-top: 38px;
  }

  .sc-toolbar {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .sc-search-wrap {
    grid-column: 1 / -1;
  }

  .sc-search-field {
    max-width: none;
  }

  .sc-stage {
    grid-template-columns: 1fr;
  }

  .sc-canvas-wrap,
  .sc-stage {
    min-height: 560px;
  }

  .sc-inspector {
    min-height: 280px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .sc-reading-guide,
  .sc-chain {
    padding-top: 70px;
    padding-bottom: 76px;
  }

  .sc-reading-principles,
  .sc-chain-flow {
    grid-column: auto;
    margin-top: 20px;
  }
}

@media (max-width: 560px) {
  .sc-hero h1 {
    font-size: 3.25rem;
  }

  .sc-total-grid strong {
    font-size: 1.85rem;
  }

  .sc-guided h2 {
    font-size: 2.35rem;
  }

  .sc-guided-metrics {
    grid-template-columns: 1fr;
  }

  .sc-guided-metrics > div,
  .sc-guided-metrics > div + div {
    min-height: 78px;
    padding: 18px 0;
    border-left: 0;
  }

  .sc-guided-metrics > div + div {
    border-top: 1px solid var(--rule);
  }

  .sc-toolbar {
    grid-template-columns: 1fr;
  }

  .sc-search-wrap,
  .sc-view-control,
  .sc-reset {
    grid-column: auto;
  }

  .sc-segmented {
    width: 100%;
  }

  .sc-segmented button {
    min-width: 0;
  }

  .sc-reset {
    justify-self: start;
  }

  .sc-canvas-wrap,
  .sc-stage {
    min-height: 480px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-loading-mark {
    animation: none;
  }
}
