.archx-page {
  --archx-copy: #aab6c5;
  --archx-heading: #f7f9fc;
  --archx-muted: #748399;
  --archx-border: rgba(148, 163, 184, 0.16);
  --archx-surface: rgba(14, 21, 32, 0.82);
  --archx-surface-solid: #101722;
  --archx-blue: #7dd3fc;
  --archx-blue-strong: #38bdf8;
  width: min(100%, 76rem);
  min-width: 0;
  margin-inline: auto;
  padding: 0 1rem 7rem;
  color: var(--archx-copy);
  overflow-x: clip;
}

.archx-page *,
.archx-page *::before,
.archx-page *::after {
  box-sizing: border-box;
}

.archx-page button,
.archx-page summary {
  -webkit-tap-highlight-color: transparent;
}

.archx-page button:focus-visible,
.archx-page summary:focus-visible,
.archx-page a:focus-visible {
  outline: 2px solid var(--archx-blue);
  outline-offset: 3px;
}

.archx-page code {
  padding: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
}

.archx-eyebrow {
  color: var(--archx-blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.archx-hero {
  position: relative;
  padding: 6.5rem 1rem 5.5rem;
  text-align: center;
}

.archx-hero::before,
.archx-hero::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(85px);
}

.archx-hero::before {
  top: 4rem;
  left: 5%;
  width: 24rem;
  height: 24rem;
  background: rgba(34, 211, 238, 0.1);
}

.archx-hero::after {
  top: 2rem;
  right: 7%;
  width: 28rem;
  height: 28rem;
  background: rgba(129, 140, 248, 0.08);
}

.archx-hero h1 {
  max-width: 62rem;
  margin: 1rem auto 0;
  color: var(--archx-heading);
  font-size: clamp(3rem, 8vw, 6.7rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.archx-hero-copy {
  max-width: 47rem;
  margin: 1.75rem auto 0;
  font-size: clamp(0.98rem, 1.8vw, 1.14rem);
  line-height: 1.8;
}

.archx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.archx-hero-actions a {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: var(--archx-heading);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
  font-weight: 650;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.archx-hero-actions a:first-child {
  border-color: rgba(56, 189, 248, 0.4);
  color: #e5f8ff;
  background: rgba(56, 189, 248, 0.14);
}

.archx-hero-actions a:hover {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(125, 211, 252, 0.1);
  transform: translateY(-1px);
}

.archx-hero-model {
  display: grid;
  max-width: 65rem;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
  margin: 4.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--archx-border);
  text-align: left;
}

.archx-hero-model div {
  min-width: 0;
}

.archx-hero-model span {
  display: block;
  color: var(--archx-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.archx-hero-model strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--archx-heading);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.archx-hero-model i {
  color: rgba(125, 211, 252, 0.5);
  font-style: normal;
}

.archx-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--archx-border);
  border-radius: 2.35rem;
  background:
    radial-gradient(circle at 0 0, rgba(45, 212, 191, 0.1), transparent 30rem),
    radial-gradient(circle at 100% 42%, rgba(96, 165, 250, 0.12), transparent 32rem),
    linear-gradient(180deg, #0b111b, #080d15);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.3);
}

.archx-aurora {
  pointer-events: none;
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(95px);
  opacity: 0.16;
}

.archx-aurora-one {
  top: 14rem;
  left: -8rem;
  width: 25rem;
  height: 25rem;
  background: #2dd4bf;
}

.archx-aurora-two {
  right: -10rem;
  bottom: 4rem;
  width: 28rem;
  height: 28rem;
  background: #60a5fa;
}

.archx-stage-intro {
  max-width: 47rem;
  padding: 4.5rem 3rem 2.4rem;
}

.archx-stage-intro h2,
.archx-section-heading h2 {
  margin-top: 0.75rem;
  color: var(--archx-heading);
  font-size: clamp(2rem, 5.2vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.052em;
  line-height: 1.02;
}

.archx-stage-intro > p:last-child,
.archx-section-heading > p:last-child {
  max-width: 41rem;
  margin-top: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.archx-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0 3rem;
  padding: 0.45rem;
  border: 1px solid var(--archx-border);
  border-radius: 1.15rem;
  background: rgba(2, 6, 12, 0.5);
}

.archx-mode-switch button {
  min-height: 4.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  color: var(--archx-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.archx-mode-switch button span,
.archx-mode-switch button small {
  display: block;
}

.archx-mode-switch button span {
  color: var(--archx-heading);
  font-size: 0.85rem;
  font-weight: 650;
}

.archx-mode-switch button small {
  margin-top: 0.3rem;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.archx-mode-switch button:hover,
.archx-mode-switch button[data-selected="true"] {
  border-color: rgba(125, 211, 252, 0.25);
  color: #bcecff;
  background: rgba(125, 211, 252, 0.09);
}

.archx-journey-shell {
  margin: 1.25rem 3rem 3rem;
  border: 1px solid var(--archx-border);
  border-radius: 1.5rem;
  background: rgba(8, 13, 21, 0.76);
  overflow: hidden;
}

.archx-journey-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--archx-border);
}

.archx-journey-heading p {
  color: var(--archx-blue);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.archx-journey-heading h3 {
  margin-top: 0.4rem;
  color: var(--archx-heading);
  font-size: 1.4rem;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.archx-journey-heading div > span {
  display: block;
  max-width: 43rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  line-height: 1.65;
}

.archx-play {
  display: inline-flex;
  min-width: 8.5rem;
  min-height: 3rem;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 999px;
  color: #c9efff;
  background: rgba(56, 189, 248, 0.1);
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

.archx-play span {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-content: center;
  border-radius: 50%;
  color: #07111d;
  background: #7dd3fc;
  font-size: 0.62rem;
}

.archx-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  border-bottom: 1px solid var(--archx-border);
}

.archx-step-grid li {
  min-width: 0;
}

.archx-step-grid button {
  position: relative;
  width: 100%;
  min-height: 7.4rem;
  padding: 1rem;
  border: 0;
  border-right: 1px solid var(--archx-border);
  border-bottom: 1px solid var(--archx-border);
  color: var(--archx-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.archx-step-grid button::after {
  content: "";
  position: absolute;
  right: 0.8rem;
  bottom: 0;
  left: 0.8rem;
  height: 2px;
  border-radius: 999px;
  background: var(--archx-blue-strong);
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.archx-step-grid button > span,
.archx-step-grid button small,
.archx-step-grid button strong {
  display: block;
}

.archx-step-grid button > span {
  color: var(--archx-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
}

.archx-step-grid button small {
  margin-top: 0.65rem;
  color: var(--archx-blue);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.archx-step-grid button strong {
  margin-top: 0.35rem;
  color: #b7c3d2;
  font-size: 0.7rem;
  font-weight: 560;
  line-height: 1.45;
}

.archx-step-grid button:hover,
.archx-step-grid button[data-selected="true"] {
  color: var(--archx-heading);
  background: rgba(125, 211, 252, 0.07);
}

.archx-step-grid button[data-complete="true"] > span {
  color: #5eead4;
}

.archx-step-grid button[data-selected="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.archx-step-grid button[data-selected="true"] strong {
  color: var(--archx-heading);
}

.archx-beat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.4rem;
  min-height: 12rem;
  padding: 1.6rem;
}

.archx-beat-index {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-content: center;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 50%;
  color: #d8f4ff;
  background: rgba(125, 211, 252, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.1rem;
}

.archx-beat p {
  color: var(--archx-blue);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.archx-beat h4 {
  margin-top: 0.45rem;
  color: var(--archx-heading);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  font-weight: 620;
  letter-spacing: -0.03em;
}

.archx-beat div > span {
  display: block;
  max-width: 42rem;
  margin-top: 0.65rem;
  font-size: 0.86rem;
  line-height: 1.7;
}

.archx-inspect-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: var(--archx-heading);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.archx-memory-line {
  margin: 0 3rem 3.5rem;
  color: #bac6d5;
  font-size: 0.88rem;
  line-height: 1.65;
  text-align: center;
}

.archx-memory-line strong {
  color: #5eead4;
}

.archx-section {
  padding: 7.5rem 0 0;
}

.archx-section-heading {
  max-width: 49rem;
  padding-inline: 1rem;
}

.archx-machine-wrap {
  margin-top: 3rem;
  padding: 0.65rem;
  border: 1px solid var(--archx-border);
  border-radius: 2.2rem;
  background: rgba(9, 14, 22, 0.7);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.archx-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  color: #b8c5d4;
  background: #070c14;
}

.archx-dashboard div {
  min-width: 0;
  padding: 1rem 1.1rem;
  border-right: 1px solid rgba(125, 211, 252, 0.1);
}

.archx-dashboard div:last-child {
  border-right: 0;
}

.archx-dashboard span,
.archx-dashboard code {
  display: block;
}

.archx-dashboard span {
  color: #6f8198;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-dashboard code {
  margin-top: 0.45rem;
  color: #bceeff;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.archx-system-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.archx-system-rail button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: var(--archx-muted);
  background: var(--archx-surface);
  font-size: 0.7rem;
  font-weight: 620;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.archx-system-rail button i,
.archx-layer-tags button i {
  width: 0.45rem;
  height: 0.45rem;
  flex: none;
  border-radius: 50%;
  background: var(--archx-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--archx-accent) 48%, transparent);
}

.archx-system-rail button:hover,
.archx-system-rail button[data-selected="true"] {
  border-color: color-mix(in srgb, var(--archx-accent) 46%, transparent);
  color: var(--archx-heading);
  background: color-mix(in srgb, var(--archx-accent) 9%, var(--archx-surface));
}

.archx-component-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.archx-component-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid var(--archx-border);
  border-radius: 1.25rem;
  background: var(--archx-surface);
}

.archx-component-rail button {
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  color: var(--archx-muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 580;
  text-align: left;
  cursor: pointer;
}

.archx-component-rail button:hover,
.archx-component-rail button[data-selected="true"] {
  border-color: var(--archx-border);
  color: var(--archx-heading);
  background: rgba(255, 255, 255, 0.045);
}

.archx-component-detail {
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border: 1px solid color-mix(in srgb, var(--archx-accent) 26%, var(--archx-border));
  border-radius: 1.6rem;
  background:
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb, var(--archx-accent) 11%, transparent),
      transparent 24rem
    ),
    var(--archx-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.archx-component-title p {
  color: color-mix(in srgb, var(--archx-accent) 75%, white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-component-title p span {
  color: var(--archx-muted);
}

.archx-component-title h3 {
  margin-top: 0.6rem;
  color: var(--archx-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.archx-component-job {
  max-width: 49rem;
  margin-top: 1.2rem;
  color: var(--archx-heading);
  font-size: clamp(1rem, 2.1vw, 1.16rem);
  line-height: 1.7;
}

.archx-component-facts {
  margin-top: 2rem;
  border-top: 1px solid var(--archx-border);
}

.archx-component-facts > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--archx-border);
}

.archx-component-facts span,
.archx-related-links > span,
.archx-deeper > span {
  color: var(--archx-muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archx-component-facts p {
  color: #b4c0cf;
  font-size: 0.8rem;
  line-height: 1.65;
}

.archx-related-links {
  margin-top: 1.8rem;
}

.archx-related-links > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.archx-related-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: var(--archx-heading);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  font-weight: 620;
}

.archx-related-links small {
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
}

.archx-related-links b {
  color: var(--archx-muted);
  font-weight: 400;
}

.archx-instruments {
  padding-top: 8.5rem;
}

.archx-symptom-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.archx-symptom-switch button {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: var(--archx-muted);
  background: var(--archx-surface);
  font-size: 0.7rem;
  font-weight: 620;
  cursor: pointer;
}

.archx-symptom-switch button:hover,
.archx-symptom-switch button[data-selected="true"] {
  border-color: rgba(56, 189, 248, 0.38);
  color: #d9f4ff;
  background: rgba(56, 189, 248, 0.1);
}

.archx-instrument-panel {
  margin-top: 1rem;
  border: 1px solid var(--archx-border);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.09), transparent 28rem),
    var(--archx-surface);
  overflow: hidden;
}

.archx-instrument-lead {
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--archx-border);
}

.archx-instrument-lead > p {
  color: var(--archx-blue);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.archx-instrument-lead h3 {
  margin-top: 0.55rem;
  color: var(--archx-heading);
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  font-weight: 620;
  letter-spacing: -0.045em;
}

.archx-instrument-lead > span {
  display: block;
  max-width: 45rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.archx-layer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.archx-layer-tags button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: #bdc8d6;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.68rem;
  cursor: pointer;
}

.archx-signal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archx-signal-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1.5rem;
  border-right: 1px solid var(--archx-border);
  border-bottom: 1px solid var(--archx-border);
}

.archx-signal-list li:last-child {
  border-right: 0;
}

.archx-signal-list li > span {
  color: var(--archx-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
}

.archx-signal-list p {
  color: var(--archx-heading);
  font-size: 0.75rem;
  font-weight: 650;
}

.archx-signal-list code {
  display: block;
  margin-top: 0.65rem;
  color: #7dd3fc;
  font-size: 0.68rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.archx-signal-list small {
  display: block;
  margin-top: 0.65rem;
  color: var(--archx-muted);
  font-size: 0.7rem;
  line-height: 1.6;
}

.archx-diagnosis {
  padding: 1.5rem;
}

.archx-diagnosis span {
  color: #5eead4;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-diagnosis p {
  max-width: 52rem;
  margin-top: 0.55rem;
  color: var(--archx-heading);
  font-size: 0.9rem;
  line-height: 1.65;
}

.archx-diagnosis small {
  display: block;
  max-width: 52rem;
  margin-top: 0.55rem;
  color: var(--archx-muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.archx-instrument-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 1.5rem 1.5rem;
}

.archx-instrument-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--archx-border);
  border-radius: 999px;
  color: var(--archx-heading);
  font-size: 0.7rem;
  font-weight: 620;
}

.archx-source-trail {
  margin-top: 8rem;
  border: 1px solid var(--archx-border);
  border-radius: 1.8rem;
  background: var(--archx-surface);
  overflow: hidden;
}

.archx-source-trail summary {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  color: var(--archx-heading);
  cursor: pointer;
  list-style: none;
}

.archx-source-trail summary::-webkit-details-marker {
  display: none;
}

.archx-source-trail summary span,
.archx-source-trail summary small {
  display: block;
}

.archx-source-trail summary span {
  font-size: 0.86rem;
  font-weight: 650;
}

.archx-source-trail summary small {
  margin-bottom: 0.35rem;
  color: var(--archx-blue);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-source-trail summary i {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  place-content: center;
  border: 1px solid var(--archx-border);
  border-radius: 50%;
  color: var(--archx-muted);
  font-style: normal;
  transition: transform 180ms ease;
}

.archx-source-trail[open] summary i {
  transform: rotate(45deg);
}

.archx-source-body {
  border-top: 1px solid var(--archx-border);
}

.archx-source-body > ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archx-source-body > ol > li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1.35rem;
  border-right: 1px solid var(--archx-border);
  border-bottom: 1px solid var(--archx-border);
}

.archx-source-body > ol > li > span {
  color: var(--archx-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.56rem;
}

.archx-source-body li p {
  color: var(--archx-heading);
  font-size: 0.7rem;
  font-weight: 650;
}

.archx-source-body li a {
  display: inline-flex;
  min-height: 2.75rem;
  max-width: 100%;
  flex-direction: column;
  justify-content: center;
  margin-top: 0.45rem;
  color: var(--archx-blue);
}

.archx-source-body li a code {
  font-size: 0.66rem;
  overflow-wrap: anywhere;
}

.archx-source-body li a small {
  margin-top: 0.25rem;
  color: var(--archx-muted);
  font-size: 0.56rem;
}

.archx-source-body li b {
  display: block;
  margin-top: 0.55rem;
  color: var(--archx-muted);
  font-size: 0.66rem;
  font-weight: 400;
  line-height: 1.55;
}

.archx-boundaries {
  padding: 1.5rem;
}

.archx-boundaries > p {
  color: #5eead4;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-boundaries ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.5rem;
  margin-top: 1rem;
}

.archx-boundaries li {
  position: relative;
  padding-left: 1rem;
  color: #aebac8;
  font-size: 0.74rem;
  line-height: 1.65;
}

.archx-boundaries li::before {
  content: "";
  position: absolute;
  top: 0.62rem;
  left: 0;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: #5eead4;
}

.archx-learning {
  padding-bottom: 1rem;
}

.archx-learning-list {
  margin-top: 2.8rem;
  border-top: 1px solid var(--archx-border);
}

.archx-learning-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--archx-border);
}

.archx-learning-list li > span {
  color: var(--archx-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
}

.archx-learning-list small {
  color: var(--archx-muted);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archx-learning-list h3 {
  margin-top: 0.25rem;
  color: var(--archx-heading);
  font-size: 1rem;
  font-weight: 630;
}

.archx-learning-list p {
  margin-top: 0.4rem;
  color: var(--archx-muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.archx-learning-list a {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  color: #c9efff;
  font-size: 0.7rem;
  font-weight: 650;
}

.archx-deeper {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.archx-deeper > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.archx-deeper a {
  display: inline-flex;
  min-height: 2.75rem;
  flex-direction: column;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--archx-border);
  border-radius: 0.8rem;
  color: var(--archx-heading);
  font-size: 0.7rem;
}

.archx-deeper a small {
  margin-bottom: 0.18rem;
  color: var(--archx-muted);
  font-size: 0.53rem;
  text-transform: uppercase;
}

/* PostgreSQL architectural cutaway — dark-first engineering blueprint. */
@keyframes arch-stage-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes arch-detail-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.arch-stage {
  animation: arch-stage-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.archx-page .arch-cutaway {
  --cut-bg: #0c121b;
  --cut-bg-elevated: #121a26;
  --cut-panel: #101822;
  --cut-border: rgba(148, 163, 184, 0.16);
  --cut-text: #e8eef7;
  --cut-muted: #93a4b8;
  --cut-faint: #6b7c91;
  --cut-accent: #7dd3fc;
  --cut-accent-strong: #38bdf8;
  --cut-node: #162131;
  --cut-node-stroke: rgba(125, 211, 252, 0.28);
  --cut-node-text: #f8fafc;
  --cut-edge: rgba(148, 163, 184, 0.55);
  --cut-grid: rgba(148, 163, 184, 0.08);
  --cut-hot: rgba(56, 189, 248, 0.16);
  overflow: hidden;
  border: 1px solid var(--cut-border);
  border-radius: 1.5rem;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(56, 189, 248, 0.08), transparent 55%),
    linear-gradient(180deg, #0e1622 0%, var(--cut-bg) 100%);
  color: var(--cut-text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.archx-page .arch-cutaway-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--cut-border);
}

.archx-page .arch-cutaway-kicker {
  margin: 0 0 0.25rem;
  color: var(--cut-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-page .arch-cutaway-header h3 {
  margin: 0;
  color: var(--cut-text);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.archx-page .arch-cutaway-sub {
  margin: 0.35rem 0 0;
  max-width: 40rem;
  color: var(--cut-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.archx-page .arch-cutaway-mode,
.archx-page .arch-cutaway-layers,
.archx-page .arch-cutaway-incidents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.archx-page .arch-cutaway-mode {
  flex: none;
  padding: 0.22rem;
  border: 1px solid var(--cut-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.archx-page .arch-cutaway-mode button,
.archx-page .arch-cutaway-layers button,
.archx-page .arch-cutaway-incidents button,
.archx-page .arch-cutaway-rail-mobile button {
  appearance: none;
  min-height: 44px;
  margin: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cut-muted);
  cursor: pointer;
  font: inherit;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.archx-page .arch-cutaway-mode button {
  min-width: 7.2rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.archx-page .arch-cutaway-mode button[data-active="true"] {
  color: #082f49;
  background: var(--cut-accent);
}

.archx-page .arch-cutaway-layers,
.archx-page .arch-cutaway-incidents {
  padding: 0.8rem 1.15rem;
  border-bottom: 1px solid var(--cut-border);
  background: rgba(255, 255, 255, 0.02);
}

.archx-page .arch-cutaway-layers button,
.archx-page .arch-cutaway-incidents button {
  display: flex;
  min-width: 9rem;
  flex: 1 1 9rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--cut-border);
  border-radius: 0.9rem;
  background: var(--cut-panel);
  text-align: left;
}

.archx-page .arch-cutaway-layers button strong,
.archx-page .arch-cutaway-incidents button strong {
  display: block;
  color: var(--cut-text);
  font-size: 0.8rem;
  font-weight: 650;
}

.archx-page .arch-cutaway-layers button span,
.archx-page .arch-cutaway-incidents button span {
  display: block;
  color: var(--cut-faint);
  font-size: 0.68rem;
  line-height: 1.35;
}

.archx-page .arch-cutaway-layers button[data-active="true"],
.archx-page .arch-cutaway-incidents button[data-active="true"] {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.14), rgba(56, 189, 248, 0.05));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

.archx-page .arch-cutaway-layers button[data-active="true"] strong,
.archx-page .arch-cutaway-incidents button[data-active="true"] strong {
  color: #e0f2fe;
}

.archx-page .arch-cutaway-body {
  padding: 0.9rem 1rem 1rem;
}

.archx-page .arch-cutaway-canvas {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cut-border);
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(18, 26, 38, 0.98), rgba(12, 18, 27, 0.98)),
    repeating-linear-gradient(0deg, transparent, transparent 23px, var(--cut-grid) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, var(--cut-grid) 24px);
}

.archx-page .arch-cutaway-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 600;
}

.archx-page .arch-cutaway-frame {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1.25;
}

.archx-page .arch-cutaway-title {
  fill: var(--cut-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.archx-page .arch-cutaway-caption,
.archx-page .arch-cutaway-section {
  fill: var(--cut-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archx-page .arch-cutaway-rail {
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
}

.archx-page .arch-cutaway-edge {
  stroke: var(--cut-edge);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 180ms ease, stroke 180ms ease, stroke-width 180ms ease;
}

.archx-page .arch-cutaway-edge[data-dimmed="true"] {
  opacity: 0.12;
}

.archx-page .arch-cutaway-edge[data-hot="true"] {
  stroke: var(--cut-accent-strong);
  stroke-width: 2.15;
  opacity: 1;
}

.archx-page .arch-cutaway-marker {
  fill: var(--cut-edge);
}

.archx-page .arch-cutaway-node-svg rect {
  fill: var(--cut-node);
  stroke: var(--cut-node-stroke);
  stroke-width: 1.2;
  transition: fill 160ms ease, stroke 160ms ease, opacity 160ms ease;
}

.archx-page .arch-cutaway-node-svg text {
  fill: var(--cut-node-text);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  pointer-events: none;
}

.archx-page .arch-cutaway-node-svg[data-dimmed="true"] {
  opacity: 0.18;
}

.archx-page .arch-cutaway-node-svg[data-hot="true"] rect,
.archx-page .arch-cutaway-node-svg[data-active="true"] rect {
  fill: #0c2a3d;
  stroke: var(--cut-accent-strong);
  stroke-width: 1.7;
}

.archx-page .arch-cutaway-hit {
  position: absolute;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.archx-page .arch-cutaway-hit:focus-visible {
  outline: 2px solid var(--cut-accent);
  outline-offset: 2px;
}

.archx-page .arch-cutaway-hit[data-dimmed="true"] {
  pointer-events: none;
}

.archx-page .arch-cutaway-card {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 6;
  width: min(17.5rem, calc(100% - 1.7rem));
  padding: 0.9rem 0.95rem 0.85rem;
  border: 1px solid var(--cut-border);
  border-radius: 0.95rem;
  background: rgba(10, 16, 24, 0.96);
  box-shadow:
    0 18px 40px -24px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px color-mix(in srgb, var(--card-accent, #38bdf8) 18%, transparent);
  animation: arch-detail-in 180ms ease both;
}

.archx-page .arch-cutaway-card-kicker {
  margin: 0;
  color: var(--cut-accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archx-page .arch-cutaway-card h4 {
  margin: 0.28rem 0 0.7rem;
  color: var(--cut-text);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.archx-page .arch-cutaway-card dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.archx-page .arch-cutaway-card dt {
  margin: 0 0 0.12rem;
  color: var(--cut-faint);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archx-page .arch-cutaway-card dd {
  margin: 0;
  color: #dbe5f0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.archx-page .arch-cutaway-card-action {
  margin: 0.75rem 0 0;
  color: var(--cut-accent);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.archx-page .arch-cutaway-hint {
  margin: 0.75rem 0.15rem 0;
  color: var(--cut-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.archx-page .arch-cutaway-beats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.archx-page .arch-cutaway-beats li {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: 0.45rem;
  min-height: 3.4rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--cut-border);
  border-radius: 0.8rem;
  background: var(--cut-panel);
}

.archx-page .arch-cutaway-beats span {
  color: var(--cut-accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.archx-page .arch-cutaway-beats p {
  margin: 0;
  color: #dbe5f0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.archx-page .arch-cutaway-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--cut-border);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--detail-accent, #38bdf8) 12%, transparent),
      transparent 46%
    ),
    rgba(255, 255, 255, 0.02);
}

.archx-page .arch-cutaway-detail-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.archx-page .arch-cutaway-detail-chip {
  flex: none;
  padding: 0.3rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--detail-accent, #38bdf8) 40%, transparent);
  border-radius: 999px;
  color: var(--cut-accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.archx-page .arch-cutaway-detail h4 {
  margin: 0;
  color: var(--cut-text);
  font-size: 0.98rem;
  font-weight: 650;
}

.archx-page .arch-cutaway-detail p {
  margin: 0.28rem 0 0;
  color: var(--cut-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.archx-page .arch-cutaway-detail-side strong {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--cut-faint);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archx-page .arch-cutaway-detail-side span {
  display: block;
  color: #dbe5f0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.archx-page .arch-cutaway-rail-mobile {
  display: none;
  gap: 0.45rem;
  padding: 0.75rem 1rem 1rem;
  overflow-x: auto;
}

.archx-page .arch-cutaway-rail-mobile button {
  flex: none;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--cut-border);
  border-radius: 999px;
  background: var(--cut-panel);
  color: var(--cut-text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.archx-page .arch-cutaway-rail-mobile button[data-active="true"] {
  color: #082f49;
  border-color: transparent;
  background: var(--cut-accent);
}

.archx-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .archx-page .arch-cutaway-card {
    display: none;
  }

  .archx-page .arch-cutaway-detail {
    grid-template-columns: 1fr;
  }

  .archx-page .arch-cutaway-header {
    flex-direction: column;
  }

  .archx-page .arch-cutaway-rail-mobile {
    display: flex;
  }
}

/* Light theme cutaway */
[data-theme="light"] .archx-page .arch-cutaway {
  --cut-bg: #f7f9fc;
  --cut-bg-elevated: #ffffff;
  --cut-panel: #ffffff;
  --cut-border: rgba(15, 23, 42, 0.12);
  --cut-text: #0f172a;
  --cut-muted: #475569;
  --cut-faint: #64748b;
  --cut-accent: #0284c7;
  --cut-accent-strong: #0369a1;
  --cut-node: #ffffff;
  --cut-node-stroke: rgba(15, 23, 42, 0.22);
  --cut-node-text: #0f172a;
  --cut-edge: #94a3b8;
  --cut-grid: rgba(148, 163, 184, 0.12);
  --cut-hot: rgba(14, 165, 233, 0.12);
  background: linear-gradient(180deg, #fbfcfe 0%, #f1f5f9 100%);
  box-shadow: 0 28px 70px -48px rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .archx-page .arch-cutaway-mode button[data-active="true"] {
  color: #0c4a6e;
  background: #e0f2fe;
}

[data-theme="light"] .archx-page .arch-cutaway-layers button[data-active="true"],
[data-theme="light"] .archx-page .arch-cutaway-incidents button[data-active="true"] {
  background: #f0f9ff;
}

[data-theme="light"] .archx-page .arch-cutaway-layers button[data-active="true"] strong,
[data-theme="light"] .archx-page .arch-cutaway-incidents button[data-active="true"] strong {
  color: #0c4a6e;
}

[data-theme="light"] .archx-page .arch-cutaway-canvas {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    repeating-linear-gradient(0deg, transparent, transparent 23px, var(--cut-grid) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, var(--cut-grid) 24px);
}

[data-theme="light"] .archx-page .arch-cutaway-node-svg[data-hot="true"] rect,
[data-theme="light"] .archx-page .arch-cutaway-node-svg[data-active="true"] rect {
  fill: #e0f2fe;
}

[data-theme="light"] .archx-page .arch-cutaway-card {
  background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .archx-page .arch-cutaway-card dd,
[data-theme="light"] .archx-page .arch-cutaway-beats p,
[data-theme="light"] .archx-page .arch-cutaway-detail-side span {
  color: #1e293b;
}

[data-theme="light"] .archx-page .arch-cutaway-rail-mobile button[data-active="true"] {
  color: #0c4a6e;
  background: #e0f2fe;
}
[data-theme="light"] .archx-page {
  --archx-copy: #445064;
  --archx-heading: #111827;
  --archx-muted: #59636e;
  --archx-border: rgba(31, 41, 55, 0.14);
  --archx-surface: rgba(255, 255, 255, 0.8);
  --archx-surface-solid: #ffffff;
  --archx-blue: #0369a1;
  --archx-blue-strong: #0284c7;
}

[data-theme="light"] .archx-hero::before {
  background: rgba(20, 184, 166, 0.11);
}

[data-theme="light"] .archx-hero::after {
  background: rgba(99, 102, 241, 0.09);
}

[data-theme="light"] .archx-hero-actions a {
  background: rgba(255, 255, 255, 0.76);
}

[data-theme="light"] .archx-hero-actions a:first-child {
  color: #075985;
  background: #e0f2fe;
}

[data-theme="light"] .archx-stage {
  background:
    radial-gradient(circle at 0 0, rgba(20, 184, 166, 0.1), transparent 30rem),
    radial-gradient(circle at 100% 42%, rgba(59, 130, 246, 0.1), transparent 32rem),
    linear-gradient(180deg, #f8fafc, #edf3f8);
  box-shadow: 0 34px 85px rgba(30, 58, 87, 0.12);
}

[data-theme="light"] .archx-mode-switch,
[data-theme="light"] .archx-journey-shell {
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .archx-mode-switch button[data-selected="true"],
[data-theme="light"] .archx-mode-switch button:hover {
  color: #075985;
  background: #e0f2fe;
}

[data-theme="light"] .archx-play {
  color: #075985;
  background: #e0f2fe;
}

[data-theme="light"] .archx-play span {
  color: #fff;
  background: #0369a1;
}

[data-theme="light"] .archx-step-grid button strong,
[data-theme="light"] .archx-component-facts p,
[data-theme="light"] .archx-boundaries li {
  color: #475569;
}

[data-theme="light"] .archx-step-grid button:hover,
[data-theme="light"] .archx-step-grid button[data-selected="true"] {
  background: rgba(224, 242, 254, 0.7);
}

[data-theme="light"] .archx-beat-index {
  color: #075985;
  background: #e0f2fe;
}

[data-theme="light"] .archx-memory-line {
  color: #334155;
}

[data-theme="light"] .archx-memory-line strong,
[data-theme="light"] .archx-boundaries > p,
[data-theme="light"] .archx-diagnosis span {
  color: #047857;
}

[data-theme="light"] .archx-system-rail button,
[data-theme="light"] .archx-component-rail,
[data-theme="light"] .archx-component-detail,
[data-theme="light"] .archx-symptom-switch button,
[data-theme="light"] .archx-instrument-panel,
[data-theme="light"] .archx-source-trail {
  box-shadow: 0 15px 45px rgba(31, 54, 78, 0.07);
}

[data-theme="light"] .archx-component-rail button:hover,
[data-theme="light"] .archx-component-rail button[data-selected="true"] {
  background: #f1f5f9;
}

[data-theme="light"] .archx-related-links a,
[data-theme="light"] .archx-layer-tags button {
  background: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .archx-layer-tags button {
  color: #475569;
}

[data-theme="light"] .archx-symptom-switch button:hover,
[data-theme="light"] .archx-symptom-switch button[data-selected="true"] {
  color: #075985;
  background: #e0f2fe;
}

[data-theme="light"] .archx-signal-list code,
[data-theme="light"] .archx-source-body li a {
  color: #0369a1;
}

[data-theme="light"] .archx-learning-list a {
  color: #075985;
  background: #e0f2fe;
}

@media (min-width: 901px) {
  .archx-journey-shell[data-mode="read"] .archx-step-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .archx-journey-shell[data-mode="write"] .archx-step-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .archx-journey-shell[data-mode="maintenance"] .archx-step-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .archx-source-body > ol > li:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .archx-hero-model {
    grid-template-columns: 1fr 1fr;
  }

  .archx-hero-model i {
    display: none;
  }

  .archx-hero-model div {
    padding: 0.6rem 0;
  }

  .archx-component-shell {
    grid-template-columns: 1fr;
  }

  .archx-component-rail {
    flex-flow: row wrap;
  }

  .archx-component-rail button {
    flex: 1 1 12rem;
  }

  .archx-signal-list,
  .archx-source-body > ol {
    grid-template-columns: 1fr 1fr;
  }

  .archx-signal-list li:nth-child(2n),
  .archx-source-body > ol > li:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .archx-page {
    padding-inline: 0.75rem;
  }

  .archx-hero {
    padding: 4.5rem 0.5rem 3.5rem;
  }

  .archx-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
  }

  .archx-hero-model {
    grid-template-columns: 1fr;
    margin-top: 3.2rem;
  }

  .archx-stage {
    border-radius: 1.6rem;
  }

  .archx-stage-intro {
    padding: 3.2rem 1.2rem 2rem;
  }

  .archx-mode-switch {
    grid-template-columns: 1fr;
    margin-inline: 1rem;
  }

  .archx-mode-switch button {
    min-height: 3.5rem;
  }

  .archx-journey-shell {
    margin: 1rem;
  }

  .archx-journey-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .archx-play {
    width: 100%;
  }

  .archx-step-grid {
    grid-template-columns: 1fr;
  }

  .archx-step-grid button {
    display: grid;
    min-height: 4.8rem;
    grid-template-columns: 2.2rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.7rem;
  }

  .archx-step-grid button > span {
    grid-row: 1 / 3;
  }

  .archx-step-grid button small,
  .archx-step-grid button strong {
    grid-column: 2;
    margin-top: 0;
  }

  .archx-beat {
    grid-template-columns: 1fr;
  }

  .archx-beat-index {
    width: 3.2rem;
    height: 3.2rem;
  }

  .archx-inspect-button {
    justify-content: space-between;
  }

  .archx-memory-line {
    margin: 0 1.2rem 2.8rem;
    text-align: left;
  }

  .archx-section {
    padding-top: 5.5rem;
  }

  .archx-machine-wrap {
    border-radius: 1.4rem;
  }

  .arch-cutaway-canvas {
    min-height: 0;
  }

  .arch-cutaway-hit {
    /* Keep hit targets; labels are in SVG short names */
  }

  .arch-cutaway-rail-mobile {
    display: flex;
  }

  .archx-dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .archx-dashboard div:nth-child(2) {
    border-right: 0;
  }

  .archx-dashboard div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(125, 211, 252, 0.1);
  }

  .archx-component-facts > div {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .archx-signal-list,
  .archx-source-body > ol,
  .archx-boundaries ul {
    grid-template-columns: 1fr;
  }

  .archx-signal-list li,
  .archx-source-body > ol > li {
    border-right: 0;
  }

  .archx-learning-list li {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .archx-learning-list a {
    grid-column: 2;
    justify-content: space-between;
  }

  .archx-deeper {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .archx-page *,
  .archx-page *::before,
  .archx-page *::after,
  .arch-stage,
  .arch-cutaway-card,
  .arch-cutaway-detail {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

