/* Atlas Docs v3: evidence-led knowledge console. Static HTML remains primary. */

body[data-site="atlas"]:has(.docs-shell) {
  --docs-v3-cyan: #42d9e8;
  --docs-v3-green: #26d39a;
  --docs-v3-gold: #f0c75e;
  --docs-v3-bg: #03111d;
  --docs-v3-panel: #071b2a;
  --docs-v3-panel-strong: #0a2435;
  --docs-v3-line: rgba(97, 220, 235, .24);
  --docs-v3-text: #f3fbff;
  --docs-v3-muted: #9db5c5;
  --docs-progress: 0;
  background:
    linear-gradient(rgba(66, 217, 232, .038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 217, 232, .038) 1px, transparent 1px),
    #03111d !important;
  background-size: 36px 36px, 36px 36px, auto !important;
  color: var(--docs-v3-text);
}

html[data-theme="light"] body[data-site="atlas"]:has(.docs-shell) {
  --docs-v3-cyan: #08718d;
  --docs-v3-green: #087c62;
  --docs-v3-gold: #8b6500;
  --docs-v3-bg: #edf6fa;
  --docs-v3-panel: #ffffff;
  --docs-v3-panel-strong: #f1f8fb;
  --docs-v3-line: rgba(7, 92, 122, .23);
  --docs-v3-text: #061522;
  --docs-v3-muted: #486273;
  background:
    linear-gradient(rgba(7, 92, 122, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 92, 122, .04) 1px, transparent 1px),
    #edf6fa !important;
  background-size: 36px 36px, 36px 36px, auto !important;
}

body[data-site="atlas"]:has(.docs-shell)::after {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--docs-v3-cyan), var(--docs-v3-green));
  transform: scaleX(var(--docs-progress));
  transform-origin: left;
}

body[data-site="atlas"]:has(.docs-shell) .docs-shell {
  width: min(100% - 32px, 1180px);
  padding: 20px 0 calc(112px + env(safe-area-inset-bottom, 0px));
}

body[data-site="atlas"]:has(.docs-shell) .docs-nav {
  z-index: 8;
  min-height: 60px;
  margin-bottom: 22px;
  padding: 8px 0;
  border-color: var(--docs-v3-line);
  background: color-mix(in srgb, var(--docs-v3-bg) 90%, transparent);
}

body[data-site="atlas"]:has(.docs-shell) .docs-brand,
body[data-site="atlas"]:has(.docs-shell) .docs-navlinks a,
body[data-site="atlas"]:has(.docs-shell) .docs-theme {
  color: var(--docs-v3-text);
  letter-spacing: 0;
}

body[data-site="atlas"]:has(.docs-shell) .docs-navlinks a,
body[data-site="atlas"]:has(.docs-shell) .docs-theme {
  min-height: 44px;
  border-color: var(--docs-v3-line);
  background: color-mix(in srgb, var(--docs-v3-panel) 86%, transparent);
}

body[data-site="atlas"]:has(.docs-shell) .docs-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, .78fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  padding: clamp(28px, 5vw, 66px) 0 30px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--docs-v3-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-site="atlas"]:has(.docs-shell) .docs-hero::before {
  content: "";
  position: absolute;
  inset: 18px auto 30px -16px;
  width: 3px;
  background: linear-gradient(180deg, var(--docs-v3-cyan), var(--docs-v3-green), transparent);
}

.docs-hero__copy {
  min-width: 0;
}

body[data-site="atlas"]:has(.docs-shell) .kicker {
  margin-bottom: 14px;
  color: var(--docs-v3-cyan);
  font-size: .72rem;
  letter-spacing: 0;
}

body[data-site="atlas"]:has(.docs-shell) .docs-hero h1 {
  max-width: 720px;
  color: var(--docs-v3-text);
  font: 900 4.4rem/.98 Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-wrap: balance;
}

body[data-site="atlas"]:has(.docs-shell) .lede {
  max-width: 710px;
  color: var(--docs-v3-muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

body[data-site="atlas"]:has(.docs-shell) .docs-hero-actions {
  margin-top: 22px;
}

body[data-site="atlas"]:has(.docs-shell) .docs-primary-cta,
body[data-site="atlas"]:has(.docs-shell) .docs-secondary-cta {
  min-height: 50px;
  border-radius: 7px;
  letter-spacing: 0;
}

body[data-site="atlas"]:has(.docs-shell) .docs-primary-cta {
  border-color: transparent;
  background: var(--docs-v3-cyan) !important;
  color: #02141d !important;
  -webkit-text-fill-color: #02141d !important;
}

body[data-site="atlas"]:has(.docs-shell) .docs-secondary-cta {
  border-color: var(--docs-v3-line);
  background: color-mix(in srgb, var(--docs-v3-panel) 82%, transparent);
  color: var(--docs-v3-text) !important;
}

.docs-proof-console {
  position: relative;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(66, 217, 232, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 217, 232, .04) 1px, transparent 1px),
    var(--docs-v3-panel);
  background-size: 20px 20px, 20px 20px, auto;
  box-shadow: 0 24px 62px rgba(0, 0, 0, .22);
}

.docs-proof-console::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0 42%, rgba(66, 217, 232, .08) 50%, transparent 58%);
  transform: translateY(-100%);
  animation: docs-v3-scan 5.8s ease-in-out infinite;
}

.docs-proof-console__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--docs-v3-line);
}

.docs-proof-console__head span,
.docs-proof-console__head strong {
  font: 850 .65rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.docs-proof-console__head span { color: var(--docs-v3-muted); }
.docs-proof-console__head strong { color: var(--docs-v3-green); }

.docs-proof-console ol {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1px;
  margin: 12px 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-radius: 7px;
  background: var(--docs-v3-line);
  list-style: none;
}

.docs-proof-console li {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: color-mix(in srgb, var(--docs-v3-panel-strong) 90%, transparent);
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 100ms ease;
}
.docs-proof-console li:active { transform: scale(.985); }
.docs-proof-console li[data-proof-active="true"] {
  background: color-mix(in srgb, var(--docs-v3-cyan) 12%, var(--docs-v3-panel-strong));
  box-shadow: inset 3px 0 var(--docs-v3-green);
}
.docs-proof-console li:focus-visible {
  outline: 2px solid var(--docs-v3-cyan);
  outline-offset: -2px;
}

.docs-proof-console li b {
  color: var(--docs-v3-cyan);
  font: 900 .65rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.docs-proof-console li div strong,
.docs-proof-console li div span { display: block; letter-spacing: 0; }
.docs-proof-console li div strong { color: var(--docs-v3-text); font-size: .82rem; }
.docs-proof-console li div span { margin-top: 3px; color: var(--docs-v3-muted); font-size: .67rem; }
.docs-proof-console li i { color: var(--docs-v3-green); font: 850 .58rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; text-transform: uppercase; }

.docs-proof-console > a {
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid var(--docs-v3-line);
  border-radius: 7px;
  color: var(--docs-v3-cyan) !important;
  background: color-mix(in srgb, var(--docs-v3-cyan) 7%, transparent);
  font-size: .75rem;
  text-decoration: none;
}

body[data-site="atlas"]:has(.docs-shell) .hero-strip {
  grid-column: 1 / -1;
  gap: 1px;
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-radius: 8px;
  background: var(--docs-v3-line);
}

body[data-site="atlas"]:has(.docs-shell) .hero-strip div {
  min-height: 104px;
  border: 0;
  border-radius: 0;
  background: var(--docs-v3-panel);
}

body[data-site="atlas"]:has(.docs-shell) .hero-strip strong {
  color: var(--docs-v3-cyan);
  font-size: .82rem;
}

body[data-site="atlas"]:has(.docs-shell) .hero-strip span {
  display: block;
  margin-top: 7px;
  color: var(--docs-v3-muted);
  font-size: .72rem;
  line-height: 1.45;
}

.docs-command-search {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--docs-v3-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--docs-v3-panel) 90%, transparent);
}

.docs-command-search > div span,
.docs-command-search > div strong { display: block; letter-spacing: 0; }
.docs-command-search > div span { color: var(--docs-v3-cyan); font: 850 .62rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.docs-command-search > div strong { margin-top: 5px; color: var(--docs-v3-text); font-size: .9rem; }
.docs-command-search label { display: block; }
.docs-command-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--docs-v3-line);
  border-radius: 7px;
  outline: 0;
  background: var(--docs-v3-bg);
  color: var(--docs-v3-text);
  font: 750 .88rem/1.2 Inter, Arial, sans-serif;
}
.docs-command-search input:focus-visible { border-color: var(--docs-v3-cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--docs-v3-cyan) 20%, transparent); }
.docs-command-search > p { margin: 0; color: var(--docs-v3-muted); font: 800 .65rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }

body[data-site="atlas"]:has(.docs-shell) .docs-section {
  margin-top: 26px;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--docs-v3-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-site="atlas"]:has(.docs-shell) .docs-section h2 {
  color: var(--docs-v3-text);
  font-size: 2.2rem;
  letter-spacing: 0;
}

body[data-site="atlas"]:has(.docs-shell) .docs-section > p { max-width: 760px; color: var(--docs-v3-muted); }

body[data-site="atlas"]:has(.docs-shell) .docs-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-site="atlas"]:has(.docs-shell) .docs-index-card {
  position: relative;
  min-height: 190px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  padding: 18px;
  overflow: hidden;
  border-color: var(--docs-v3-line);
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--docs-v3-cyan) 8%, transparent), transparent 48%),
    var(--docs-v3-panel);
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

body[data-site="atlas"]:has(.docs-shell) .docs-index-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle 150px at var(--docs-pulse-x, 50%) var(--docs-pulse-y, 50%), color-mix(in srgb, var(--docs-v3-cyan) 24%, transparent), transparent 72%);
  opacity: 0;
  transform: scale(.82);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(.16, 1, .3, 1);
}

body[data-site="atlas"]:has(.docs-shell) .docs-index-card[data-docs-pulse="true"]::before {
  opacity: 1;
  transform: scale(1);
}

body[data-site="atlas"]:has(.docs-shell) .docs-index-card > * {
  position: relative;
  z-index: 1;
}

body[data-site="atlas"]:has(.docs-shell) .docs-index-card::after {
  content: "Open chapter  →";
  align-self: end;
  margin-top: 14px;
  color: var(--docs-v3-cyan);
  font: 850 .64rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

body[data-site="atlas"]:has(.docs-shell) .docs-index-card span { color: var(--docs-v3-cyan); letter-spacing: 0; }
body[data-site="atlas"]:has(.docs-shell) .docs-index-card h3 { color: var(--docs-v3-text); font-size: 1.05rem; }
body[data-site="atlas"]:has(.docs-shell) .docs-index-card p { color: var(--docs-v3-muted); font-size: .82rem; line-height: 1.48; }
body[data-site="atlas"]:has(.docs-shell) .docs-index-card:hover,
body[data-site="atlas"]:has(.docs-shell) .docs-index-card:focus-visible { transform: translateY(-3px); border-color: var(--docs-v3-cyan); }
body[data-site="atlas"]:has(.docs-shell) .docs-index-card[hidden] { display: none !important; }

body[data-site="atlas"]:has(.docs-shell) .docs-list {
  counter-reset: docs-loop;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-radius: 8px;
  background: var(--docs-v3-line);
  list-style: none;
}

.docs-loop-console {
  --docs-loop-progress: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr);
  gap: 10px;
  margin-top: 18px;
}

.docs-loop-stage {
  position: relative;
  min-width: 0;
  min-height: 312px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-left: 3px solid var(--docs-v3-green);
  border-radius: 8px;
  background:
    linear-gradient(rgba(66, 217, 232, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 217, 232, .04) 1px, transparent 1px),
    linear-gradient(145deg, color-mix(in srgb, var(--docs-v3-green) 8%, transparent), transparent 60%),
    var(--docs-v3-panel);
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.docs-loop-stage::after {
  content: "";
  position: absolute;
  inset: auto 20px 0;
  height: 3px;
  background: linear-gradient(90deg, var(--docs-v3-green), var(--docs-v3-cyan));
  transform: scaleX(var(--docs-loop-progress));
  transform-origin: left;
  transition: transform 260ms cubic-bezier(.16, 1, .3, 1);
}

.docs-loop-stage > header,
.docs-loop-stage > footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.docs-loop-stage > header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--docs-v3-line);
}

.docs-loop-stage > header span,
.docs-loop-stage > header small,
.docs-loop-stage > footer span,
.docs-loop-stage > footer strong {
  font: 900 .64rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.docs-loop-stage > header span,
.docs-loop-stage > footer strong { color: var(--docs-v3-green); }
.docs-loop-stage > header small,
.docs-loop-stage > footer span { color: var(--docs-v3-muted); }

.docs-loop-stage__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px 0;
}

.docs-loop-stage__instrument {
  position: relative;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--docs-v3-cyan) 66%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--docs-v3-cyan) 6%, transparent);
  box-shadow: inset 0 0 0 24px color-mix(in srgb, var(--docs-v3-bg) 58%, transparent);
}

.docs-loop-stage__instrument::before,
.docs-loop-stage__instrument::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.docs-loop-stage__instrument::before { inset: 18px; border: 1px solid var(--docs-v3-line); }
.docs-loop-stage__instrument::after { inset: 43px; border: 1px solid var(--docs-v3-green); background: var(--docs-v3-panel); }
.docs-loop-stage__instrument span {
  position: relative;
  z-index: 2;
  color: var(--docs-v3-text);
  font: 950 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-loop-stage__instrument i,
.docs-loop-stage__instrument b {
  position: absolute;
  inset: 50% 7px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--docs-v3-cyan), transparent);
}
.docs-loop-stage__instrument b { transform: rotate(90deg); }

.docs-loop-stage__body > div:last-child > p:first-child {
  margin: 0 0 8px;
  color: var(--docs-v3-cyan);
  font: 900 .62rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-loop-stage__body h3 {
  margin: 0;
  color: var(--docs-v3-text);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  letter-spacing: 0;
}
.docs-loop-stage__body > div:last-child > p:last-child {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--docs-v3-muted);
  font-size: .94rem;
  line-height: 1.58;
}
.docs-loop-stage > footer { padding-top: 14px; border-top: 1px solid var(--docs-v3-line); }

.docs-loop-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-radius: 8px;
  background: var(--docs-v3-line);
}

.docs-loop-node {
  position: relative;
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--docs-v3-panel);
  color: var(--docs-v3-text);
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 100ms ease;
}
.docs-loop-node span { color: var(--docs-v3-green); font: 900 .62rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.docs-loop-node strong { overflow: hidden; font-size: .72rem; line-height: 1.3; text-overflow: ellipsis; }
.docs-loop-node[data-loop-active="true"] {
  background: color-mix(in srgb, var(--docs-v3-cyan) 12%, var(--docs-v3-panel-strong));
  box-shadow: inset 3px 0 var(--docs-v3-cyan);
}
.docs-loop-node[data-loop-complete="true"] span::after { content: "  ✓"; color: var(--docs-v3-green); }
.docs-loop-node:active { transform: scale(.975); }
.docs-loop-node:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--docs-v3-cyan); outline-offset: -2px; }

.docs-loop-node::after,
.docs-surface-node::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 110px at var(--docs-pulse-x, 50%) var(--docs-pulse-y, 50%), color-mix(in srgb, var(--docs-v3-cyan) 24%, transparent), transparent 72%);
  opacity: 0;
  transition: opacity 180ms ease;
}
.docs-loop-node[data-docs-pulse="true"]::after,
.docs-surface-node[data-docs-pulse="true"]::after { opacity: 1; }

body[data-site="atlas"]:has(.docs-shell) .docs-list li {
  counter-increment: docs-loop;
  min-height: 112px;
  margin: 0;
  padding: 16px;
  background: var(--docs-v3-panel);
  color: var(--docs-v3-text);
  font-weight: 750;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

body[data-site="atlas"]:has(.docs-shell) .docs-list li::before {
  content: counter(docs-loop, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--docs-v3-green);
  font: 900 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

body[data-site="atlas"]:has(.docs-shell) .docs-list li[data-loop-active="true"] {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--docs-v3-cyan) 15%, transparent), transparent 58%),
    var(--docs-v3-panel-strong);
  color: var(--docs-v3-text);
  box-shadow: inset 0 -3px var(--docs-v3-cyan);
  transform: translateY(-2px);
}
body[data-site="atlas"]:has(.docs-shell) .docs-list li[data-loop-complete="true"] {
  background: color-mix(in srgb, var(--docs-v3-green) 8%, var(--docs-v3-panel));
}
body[data-site="atlas"]:has(.docs-shell) .docs-list li[data-loop-complete="true"]::before { content: "✓"; color: var(--docs-v3-green); }
body[data-site="atlas"]:has(.docs-shell) .docs-list li:focus-visible { outline: 2px solid var(--docs-v3-cyan); outline-offset: -2px; }
body[data-site="atlas"]:has(.docs-shell) .docs-list li[data-docs-pulse="true"] {
  background-image: radial-gradient(circle 130px at var(--docs-pulse-x, 50%) var(--docs-pulse-y, 50%), color-mix(in srgb, var(--docs-v3-cyan) 22%, transparent), transparent 72%);
}

.docs-list[data-docs-enhanced="true"] { display: none !important; }

.docs-surface-console {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr);
  gap: 10px;
  margin-top: 18px;
}

.docs-surface-stage {
  position: relative;
  min-width: 0;
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-left: 3px solid var(--docs-v3-cyan);
  border-radius: 8px;
  background:
    linear-gradient(rgba(66, 217, 232, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 217, 232, .04) 1px, transparent 1px),
    linear-gradient(145deg, color-mix(in srgb, var(--docs-v3-cyan) 10%, transparent), transparent 58%),
    var(--docs-v3-panel);
  background-size: 24px 24px, 24px 24px, auto, auto;
  color: var(--docs-v3-text);
  transition: border-color 180ms ease, background 180ms ease;
}
.docs-surface-stage[data-surface="desk"],
.docs-surface-stage[data-surface="docs"] { border-left-color: var(--docs-v3-green); }
.docs-surface-stage[data-surface="today"],
.docs-surface-stage[data-surface="pro"] { border-left-color: var(--docs-v3-gold); }
.docs-surface-stage::after {
  content: "";
  position: absolute;
  width: 260px;
  aspect-ratio: 1;
  right: -82px;
  bottom: -92px;
  pointer-events: none;
  border: 1px solid var(--docs-v3-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 34px color-mix(in srgb, var(--docs-v3-bg) 48%, transparent), inset 0 0 0 35px var(--docs-v3-line);
}
.docs-surface-stage > * { position: relative; z-index: 1; }
.docs-surface-stage > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--docs-v3-line); }
.docs-surface-stage > header span {
  color: var(--docs-v3-cyan);
  font: 900 .64rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-surface-stage > header i {
  max-width: 60%;
  overflow: hidden;
  color: var(--docs-v3-muted);
  font: 800 .58rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.docs-surface-stage__body { align-self: center; max-width: 720px; padding: 28px 0; }
.docs-surface-stage__body > div > p {
  margin: 0 0 10px;
  color: var(--docs-v3-green);
  font: 900 .7rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.docs-surface-stage[data-surface="today"] .docs-surface-stage__body > div > p,
.docs-surface-stage[data-surface="pro"] .docs-surface-stage__body > div > p { color: var(--docs-v3-gold); }
.docs-surface-stage__body h3 { margin: 0; color: var(--docs-v3-text); font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: .95; letter-spacing: 0; }
.docs-surface-stage__body > p { max-width: 620px; margin: 20px 0 0; color: var(--docs-v3-muted); font-size: 1rem; line-height: 1.62; }
.docs-surface-stage > a {
  width: fit-content;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  padding: 0 16px;
  border: 1px solid var(--docs-v3-line);
  border-radius: 7px;
  color: var(--docs-v3-cyan);
  font: 900 .65rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
  text-transform: uppercase;
}

.docs-surface-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  overflow: hidden;
  border: 1px solid var(--docs-v3-line);
  border-radius: 8px;
  background: var(--docs-v3-line);
}

.docs-surface-node {
  position: relative;
  min-width: 0;
  min-height: 118px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--docs-v3-panel);
  color: var(--docs-v3-text);
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 100ms ease;
}
.docs-surface-node > span { color: var(--docs-v3-cyan); font: 900 .62rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.docs-surface-node strong,
.docs-surface-node small { display: block; }
.docs-surface-node strong { font-size: .8rem; }
.docs-surface-node small { margin-top: 5px; color: var(--docs-v3-muted); font: 800 .57rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.docs-surface-node[data-surface-active="true"] { background: color-mix(in srgb, var(--docs-v3-cyan) 12%, var(--docs-v3-panel-strong)); box-shadow: inset 3px 0 var(--docs-v3-cyan); }
.docs-surface-node[data-surface="desk"][data-surface-active="true"],
.docs-surface-node[data-surface="docs"][data-surface-active="true"] { box-shadow: inset 3px 0 var(--docs-v3-green); }
.docs-surface-node[data-surface="today"][data-surface-active="true"],
.docs-surface-node[data-surface="pro"][data-surface-active="true"] { box-shadow: inset 3px 0 var(--docs-v3-gold); }
.docs-surface-node:active { transform: scale(.975); }
.docs-surface-node:focus-visible,
.docs-surface-stage > a:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--docs-v3-cyan); outline-offset: -2px; }
.table-wrap[data-docs-enhanced="true"] { display: none !important; }

body[data-site="atlas"]:has(.docs-shell) .table-wrap {
  margin-top: 18px;
  border-color: var(--docs-v3-line);
  background: var(--docs-v3-panel);
}
body[data-site="atlas"]:has(.docs-shell) th { background: var(--docs-v3-panel-strong); color: var(--docs-v3-text); letter-spacing: 0; }
body[data-site="atlas"]:has(.docs-shell) td { color: var(--docs-v3-muted); border-color: var(--docs-v3-line); }
body[data-site="atlas"]:has(.docs-shell) .docs-footer { border-top: 1px solid var(--docs-v3-line); color: var(--docs-v3-muted); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes docs-v3-scan {
  0%, 18% { transform: translateY(-100%); opacity: 0; }
  35%, 68% { opacity: 1; }
  86%, 100% { transform: translateY(100%); opacity: 0; }
}

@media (max-width: 900px) {
  body[data-site="atlas"]:has(.docs-shell) .docs-hero { grid-template-columns: minmax(0, 1fr); }
  body[data-site="atlas"]:has(.docs-shell) .docs-hero h1 { font-size: 3.25rem; }
  body[data-site="atlas"]:has(.docs-shell) .docs-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-site="atlas"]:has(.docs-shell) .docs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-command-search { grid-template-columns: minmax(0, 1fr); }
  .docs-loop-console,
  .docs-surface-console { grid-template-columns: minmax(0, 1fr); }
  .docs-loop-rail,
  .docs-surface-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body[data-site="atlas"]:has(.docs-shell) .docs-shell {
    width: min(100% - 24px, 1180px);
    padding-top: calc(74px + env(safe-area-inset-top, 0px));
  }
  body[data-site="atlas"]:has(.docs-shell) .docs-nav { display: none !important; }
}

@media (max-width: 620px) {
  body[data-site="atlas"]:has(.docs-shell) .docs-hero {
    gap: 22px;
    padding: 26px 0 24px;
  }
  body[data-site="atlas"]:has(.docs-shell) .docs-hero::before { left: -12px; }
  body[data-site="atlas"]:has(.docs-shell) .docs-hero h1 { font-size: 2.45rem; }
  body[data-site="atlas"]:has(.docs-shell) .docs-section h2 { font-size: 1.72rem; }
  body[data-site="atlas"]:has(.docs-shell) .docs-hero-actions { display: grid; }
  .docs-proof-console { padding: 12px; }
  .docs-proof-console__head { align-items: flex-start; }
  .docs-proof-console__head strong { text-align: right; }
  body[data-site="atlas"]:has(.docs-shell) .hero-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  body[data-site="atlas"]:has(.docs-shell) .hero-strip div { scroll-snap-align: start; }
  .docs-command-search { padding: 13px; }
  body[data-site="atlas"]:has(.docs-shell) .docs-card-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-site="atlas"]:has(.docs-shell) .docs-index-card { min-height: 166px; }
  body[data-site="atlas"]:has(.docs-shell) .docs-list { grid-template-columns: minmax(0, 1fr); }
  body[data-site="atlas"]:has(.docs-shell) .docs-list li { min-height: 86px; }
  .docs-loop-stage { min-height: 330px; padding: 16px; }
  .docs-loop-stage__body { grid-template-columns: 98px minmax(0, 1fr); gap: 16px; }
  .docs-loop-stage__instrument { width: 96px; }
  .docs-loop-stage__instrument::after { inset: 29px; }
  .docs-loop-stage__body h3 { font-size: 1.7rem; }
  .docs-loop-stage__body > div:last-child > p:last-child { font-size: .84rem; }
  .docs-loop-rail,
  .docs-surface-rail {
    display: flex;
    gap: 1px;
    padding: 1px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .docs-loop-node { flex: 0 0 142px; min-height: 74px; scroll-snap-align: start; }
  .docs-surface-stage { min-height: 330px; padding: 18px; }
  .docs-surface-stage__body h3 { font-size: 3.15rem; }
  .docs-surface-stage__body > p { font-size: .9rem; }
  .docs-surface-node { flex: 0 0 154px; min-height: 86px; scroll-snap-align: start; }
}

/* Ultra-HD documentation atlas. More chapters remain visible at once while
   paragraph measures stay bounded for scanning and long-form reading. */
@media (min-width: 1800px) {
  body[data-site="atlas"]:has(.docs-shell) .docs-shell {
    width: min(1920px, calc(100% - var(--atlas-uhd-gutter, 128px)));
    max-width: 1920px;
  }

  body[data-site="atlas"]:has(.docs-shell) .docs-hero {
    grid-template-columns: minmax(0, 1.14fr) minmax(520px, .86fr);
    gap: 72px;
  }

  body[data-site="atlas"]:has(.docs-shell) .docs-card-grid,
  body[data-site="atlas"]:has(.docs-shell) .docs-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .docs-loop-console,
  .docs-surface-console { grid-template-columns: minmax(0, 1.55fr) minmax(420px, .45fr); }
}

@media (prefers-reduced-motion: reduce) {
  .docs-proof-console::after { animation: none !important; }
  body[data-site="atlas"]:has(.docs-shell) .docs-index-card,
  body[data-site="atlas"]:has(.docs-shell) .docs-index-card::before,
  .docs-proof-console li,
  .docs-loop-stage::after,
  .docs-loop-node,
  .docs-loop-node::after,
  .docs-surface-stage,
  .docs-surface-node,
  .docs-surface-node::after,
  body[data-site="atlas"]:has(.docs-shell) .docs-list li { transition: none !important; }
}
