/* Atlas Research Boundary v2: evidence-led decision boundary instrument. */

body[data-atlas-boundary-world] {
  --boundary-bg: #020d17;
  --boundary-panel: rgba(5, 22, 36, .9);
  --boundary-panel-strong: #061826;
  --boundary-line: rgba(84, 220, 238, .24);
  --boundary-cyan: #3dd9e9;
  --boundary-green: #25d49a;
  --boundary-gold: #f4c857;
  --boundary-text: #f4fbff;
  --boundary-muted: #a9c1d2;
  overflow-x: clip;
  background: var(--boundary-bg);
  color: var(--boundary-text);
}

html[data-theme="light"] body[data-atlas-boundary-world] {
  --boundary-bg: #eef7fb;
  --boundary-panel: rgba(248, 252, 255, .94);
  --boundary-panel-strong: #fff;
  --boundary-line: rgba(7, 91, 116, .2);
  --boundary-cyan: #08718d;
  --boundary-green: #087c62;
  --boundary-gold: #8b6500;
  --boundary-text: #071827;
  --boundary-muted: #4b6273;
}

body[data-site="atlas"][data-atlas-boundary-world]:has(.docs-shell) .docs-shell {
  position: relative;
  isolation: isolate;
  width: min(1320px, calc(100vw - 32px)) !important;
  max-width: 1320px !important;
}

body[data-atlas-boundary-world] .docs-shell::before {
  position: absolute;
  z-index: -2;
  top: 80px;
  left: 50%;
  width: 100vw;
  height: 760px;
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
  background:
    linear-gradient(rgba(61, 217, 233, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 217, 233, .03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(10, 48, 62, .34), transparent 84%);
  background-size: 48px 48px, 48px 48px, auto;
  mask-image: linear-gradient(#000 0 78%, transparent 100%);
}

html[data-theme="light"] body[data-atlas-boundary-world] .docs-shell::before {
  background:
    linear-gradient(rgba(8, 113, 141, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 113, 141, .04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(209, 236, 244, .72), transparent 84%);
  background-size: 48px 48px, 48px 48px, auto;
}

.atlas-boundary-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr);
  gap: 64px;
  align-items: center;
  min-height: 620px;
  padding: 64px 0 52px;
  border-bottom: 1px solid var(--boundary-line);
}

.atlas-boundary-eyebrow,
.atlas-boundary-section__head span,
.atlas-boundary-field__label,
.atlas-boundary-lane > span {
  display: block;
  margin: 0 0 12px;
  color: var(--boundary-cyan);
  font: 900 11px/1.35 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atlas-boundary-hero h1 {
  max-width: 790px;
  margin: 0;
  color: var(--boundary-text);
  font: 900 68px/.98 Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-wrap: balance;
}

.atlas-boundary-lede {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--boundary-muted);
  font-size: 18px;
  line-height: 1.64;
}

.atlas-boundary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.atlas-boundary-actions a,
.atlas-boundary-note a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 18px;
  border: 1px solid var(--boundary-cyan);
  border-radius: 6px;
  background: var(--boundary-cyan);
  color: #021018;
  font: 900 11px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 100ms ease, filter 180ms ease, background-color 180ms ease;
}

html[data-theme="light"] .atlas-boundary-actions a:first-child { color: #fff; }
.atlas-boundary-actions a + a,
.atlas-boundary-note a {
  border-color: var(--boundary-line);
  background: rgba(61, 217, 233, .08);
  color: var(--boundary-cyan);
}
body[data-atlas-boundary-world] .atlas-boundary-actions a:first-child {
  color: #021018 !important;
}
html[data-theme="light"] body[data-atlas-boundary-world] .atlas-boundary-actions a:first-child {
  color: #fff !important;
}
.atlas-boundary-actions a:active,
.atlas-boundary-note a:active { transform: scale(.975); }

.atlas-boundary-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0 0;
  padding: 0;
  border-block: 1px solid var(--boundary-line);
}

.atlas-boundary-proof div {
  min-width: 0;
  padding: 15px 14px;
  border-right: 1px solid var(--boundary-line);
}
.atlas-boundary-proof div:first-child { padding-left: 0; }
.atlas-boundary-proof div:last-child { border-right: 0; }
.atlas-boundary-proof dt {
  color: var(--boundary-muted);
  font: 800 9px/1.3 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.atlas-boundary-proof dd {
  margin: 7px 0 0;
  color: var(--boundary-text);
  font: 900 15px/1.25 "JetBrains Mono", ui-monospace, monospace;
}

.atlas-boundary-status {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0 14px;
  border: 1px solid var(--boundary-line);
  border-radius: 999px;
  color: var(--boundary-muted);
  font: 900 10px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.atlas-boundary-status::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--boundary-green);
  box-shadow: 0 0 20px color-mix(in srgb, var(--boundary-green) 65%, transparent);
}

.atlas-boundary-field {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--boundary-line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(61, 217, 233, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 217, 233, .04) 1px, transparent 1px),
    rgba(2, 14, 24, .62);
  background-size: 32px 32px, 32px 32px, auto;
}

html[data-theme="light"] .atlas-boundary-field {
  background:
    linear-gradient(rgba(8, 113, 141, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 113, 141, .05) 1px, transparent 1px),
    rgba(255, 255, 255, .78);
  background-size: 32px 32px, 32px 32px, auto;
}

.atlas-boundary-field::before,
.atlas-boundary-field::after {
  position: absolute;
  z-index: 1;
  inset: 14%;
  content: "";
  border: 1px solid var(--boundary-line);
  border-radius: 50%;
  transform: rotate(-18deg);
  animation: atlas-boundary-orbit 15s linear infinite;
}
.atlas-boundary-field::after {
  inset: 27% 7%;
  transform: rotate(34deg);
  animation-direction: reverse;
  animation-duration: 20s;
}

.atlas-boundary-field__label {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 20px;
  margin: 0;
}

.atlas-boundary-field__core {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 50%;
  width: 132px;
  height: 132px;
  display: grid;
  place-content: center;
  gap: 8px;
  transform: translate(-50%, -62%);
  border: 1px solid var(--boundary-cyan);
  border-radius: 50%;
  background: var(--boundary-panel-strong);
  text-align: center;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, .34),
    0 0 0 22px rgba(61, 217, 233, .035),
    0 0 72px rgba(61, 217, 233, .14);
}
.atlas-boundary-field__core::after {
  position: absolute;
  inset: -32px;
  z-index: -1;
  content: "";
  border: 1px dashed var(--boundary-line);
  border-radius: 50%;
  animation: atlas-boundary-spin 24s linear infinite;
}
.atlas-boundary-field__core span {
  color: var(--boundary-text);
  font: 900 21px/1 "JetBrains Mono", ui-monospace, monospace;
}
.atlas-boundary-field__core b {
  color: var(--boundary-cyan);
  font: 900 8px/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .12em;
}

.atlas-boundary-node {
  position: absolute;
  z-index: 7;
  min-width: 96px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--boundary-line);
  border-radius: 7px;
  background: var(--boundary-panel-strong);
  color: var(--boundary-muted);
  font: 900 10px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 8px rgba(61, 217, 233, .025);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
}
.atlas-boundary-node:nth-of-type(1) { left: 7%; top: 27%; }
.atlas-boundary-node:nth-of-type(2) { right: 7%; top: 25%; }
.atlas-boundary-node:nth-of-type(3) { left: 10%; bottom: 23%; }
.atlas-boundary-node[data-active="true"] { color: var(--boundary-cyan); border-color: var(--boundary-cyan); transform: translateY(-3px); }
.atlas-boundary-node[data-tone="interpret"][data-active="true"] { color: var(--boundary-green); border-color: var(--boundary-green); }
.atlas-boundary-node[data-tone="stop"][data-active="true"] { color: var(--boundary-gold); border-color: var(--boundary-gold); }
.atlas-boundary-node:focus-visible { outline: 3px solid var(--boundary-gold); outline-offset: 3px; }

.atlas-boundary-field__focus {
  position: absolute;
  z-index: 6;
  right: 18px;
  bottom: 18px;
  left: 18px;
  min-height: 94px;
  padding: 14px 16px;
  border: 1px solid var(--boundary-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--boundary-panel-strong) 92%, transparent);
  backdrop-filter: blur(12px);
}
.atlas-boundary-field__focus strong {
  display: block;
  color: var(--boundary-cyan);
  font: 900 12px/1.25 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.atlas-boundary-field__focus p { margin: 7px 0 0; color: var(--boundary-muted); font-size: 13px; line-height: 1.45; }

.atlas-boundary-section {
  padding: 68px 0;
  border-bottom: 1px solid var(--boundary-line);
}

.atlas-boundary-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .58fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}
.atlas-boundary-section__head h2 {
  max-width: 790px;
  margin: 0;
  color: var(--boundary-text);
  font: 900 46px/1.04 Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-wrap: balance;
}
.atlas-boundary-section__head p { margin: 0; color: var(--boundary-muted); font-size: 15px; line-height: 1.62; }

.atlas-boundary-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--boundary-line);
  border-radius: 8px;
  background: var(--boundary-panel);
}
.atlas-boundary-path article { position: relative; min-height: 210px; padding: 26px; border-right: 1px solid var(--boundary-line); }
.atlas-boundary-path article:last-child { border-right: 0; }
.atlas-boundary-path article + article::before {
  position: absolute;
  top: 50%;
  left: -12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  content: "→";
  transform: translateY(-50%);
  border: 1px solid var(--boundary-line);
  border-radius: 50%;
  background: var(--boundary-panel-strong);
  color: var(--boundary-cyan);
  font: 900 12px/1 "JetBrains Mono", ui-monospace, monospace;
}
.atlas-boundary-path article[data-stop="true"] { background: linear-gradient(135deg, color-mix(in srgb, var(--boundary-gold) 10%, transparent), transparent 66%); }
.atlas-boundary-path span { color: var(--boundary-cyan); font: 900 12px/1 "JetBrains Mono", ui-monospace, monospace; }
.atlas-boundary-path [data-stop="true"] span { color: var(--boundary-gold); }
.atlas-boundary-path h3 { margin: 34px 0 0; color: var(--boundary-text); font-size: 23px; }
.atlas-boundary-path p { margin: 10px 0 0; color: var(--boundary-muted); font-size: 14px; line-height: 1.58; }

.atlas-boundary-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.atlas-boundary-lane { padding: 30px; border-top: 3px solid var(--boundary-green); background: var(--boundary-panel); }
.atlas-boundary-lane[data-lane="forbidden"] { border-top-color: var(--boundary-gold); }
.atlas-boundary-lane[data-lane="forbidden"] > span { color: var(--boundary-gold); }
.atlas-boundary-lane h3 { margin: 0; color: var(--boundary-text); font-size: 28px; }
.atlas-boundary-lane ul { margin: 24px 0 0; padding: 0; list-style: none; }
.atlas-boundary-lane li {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--boundary-line);
  color: var(--boundary-text);
  font-weight: 800;
  line-height: 1.4;
}
.atlas-boundary-lane li::before { width: 8px; height: 8px; flex: 0 0 auto; content: ""; border-radius: 50%; background: var(--boundary-green); }
.atlas-boundary-lane[data-lane="forbidden"] li::before { border: 2px solid var(--boundary-gold); background: transparent; }

.atlas-boundary-signals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--boundary-line); border-radius: 8px; background: var(--boundary-line); }
.atlas-boundary-signals article { min-height: 220px; padding: 28px; background: var(--boundary-panel-strong); }
.atlas-boundary-signals b { color: var(--boundary-cyan); font: 900 10px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.atlas-boundary-signals strong { display: block; margin-top: 34px; color: var(--boundary-text); font-size: 23px; }
.atlas-boundary-signals p { margin: 12px 0 0; color: var(--boundary-muted); font-size: 14px; line-height: 1.58; }

.atlas-boundary-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--boundary-line);
}
.atlas-boundary-note p { margin: 0; color: var(--boundary-muted); }
.atlas-boundary-note strong { color: var(--boundary-text); }

body[data-atlas-boundary-world] .docs-brand,
body[data-atlas-boundary-world] .docs-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

[data-atlas-boundary-world] [data-boundary-reveal] {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 420ms ease, transform 420ms cubic-bezier(.16, 1, .3, 1);
}
[data-atlas-boundary-world] [data-boundary-reveal].is-visible { opacity: 1; transform: none; }

@keyframes atlas-boundary-orbit { from { transform: rotate(-18deg); } to { transform: rotate(342deg); } }
@keyframes atlas-boundary-spin { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
  body[data-site="atlas"][data-atlas-boundary-world]:has(.docs-shell) .docs-shell {
    width: min(100%, calc(100vw - 24px)) !important;
    max-width: 100% !important;
  }
  .atlas-boundary-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; padding: 30px 0 36px; }
  .atlas-boundary-hero h1 { font-size: 50px; }
  .atlas-boundary-field { min-height: 360px; }
  .atlas-boundary-section { padding: 44px 0; }
  .atlas-boundary-section__head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .atlas-boundary-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-boundary-path article:nth-child(2) { border-right: 0; }
  .atlas-boundary-path article:nth-child(n+3) { border-top: 1px solid var(--boundary-line); }
  .atlas-boundary-path article:nth-child(3)::before { display: none; }
}

@media (max-width: 580px) {
  .atlas-boundary-hero h1 { font-size: 40px; }
  .atlas-boundary-lede { font-size: 16px; }
  .atlas-boundary-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .atlas-boundary-actions a { width: 100%; }
  .atlas-boundary-proof div { padding-inline: 8px; }
  .atlas-boundary-proof dd { font-size: 12px; }
  .atlas-boundary-status { width: 100%; justify-content: center; box-sizing: border-box; }
  .atlas-boundary-field { min-height: 330px; }
  .atlas-boundary-field__core { width: 92px; height: 92px; }
  .atlas-boundary-field__core span { font-size: 16px; }
  .atlas-boundary-node { min-width: 78px; padding-inline: 8px; font-size: 8px; }
  .atlas-boundary-node:nth-of-type(1) { left: 4%; top: 25%; }
  .atlas-boundary-node:nth-of-type(2) { right: 4%; top: 23%; }
  .atlas-boundary-node:nth-of-type(3) { left: 5%; bottom: 29%; }
  .atlas-boundary-field__focus { min-height: 84px; padding: 12px 13px; }
  .atlas-boundary-field__focus p { font-size: 12px; }
  .atlas-boundary-section__head h2 { font-size: 32px; }
  .atlas-boundary-path { grid-template-columns: minmax(0, 1fr); }
  .atlas-boundary-path article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--boundary-line); }
  .atlas-boundary-path article:last-child { border-bottom: 0; }
  .atlas-boundary-path article:nth-child(n+3) { border-top: 0; }
  .atlas-boundary-path article + article::before { top: -12px; left: 26px; transform: rotate(90deg); }
  .atlas-boundary-path article:nth-child(3)::before { display: grid; }
  .atlas-boundary-lanes { grid-template-columns: minmax(0, 1fr); }
  .atlas-boundary-lane { padding: 24px 18px; }
  .atlas-boundary-signals { grid-template-columns: minmax(0, 1fr); }
  .atlas-boundary-signals article { min-height: 0; padding: 24px 18px; }
  .atlas-boundary-signals strong { margin-top: 22px; }
  .atlas-boundary-note { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1800px) {
  body[data-site="atlas"][data-atlas-boundary-world]:has(.docs-shell) .docs-shell {
    width: min(2320px, calc(100vw - 160px)) !important;
    max-width: 2320px !important;
  }
  .atlas-boundary-hero { grid-template-columns: minmax(0, 1.15fr) minmax(760px, .85fr); gap: 100px; min-height: 820px; }
  .atlas-boundary-hero h1 { max-width: 1060px; font-size: 92px; }
  .atlas-boundary-lede { max-width: 880px; font-size: 22px; }
  .atlas-boundary-field { min-height: 680px; }
  .atlas-boundary-section__head h2 { max-width: 1040px; font-size: 64px; }
  .atlas-boundary-path article { min-height: 290px; }
  .atlas-boundary-signals article { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-boundary-field::before,
  .atlas-boundary-field::after,
  .atlas-boundary-field__core::after { animation: none; }
  [data-atlas-boundary-world] [data-boundary-reveal] { opacity: 1; transform: none; transition: none; }
  .atlas-boundary-node { transition: none; }
}
