/* Shared Circuit Atlas shell and controls. */
:root {
  --atlas-ink: #1a2f39;
  --atlas-muted: #48616a;
  --atlas-canvas: #eef3f2;
  --atlas-panel: #fff;
  --atlas-line: #c6d5d7;
  --atlas-teal: #126b59;
  --atlas-teal-dark: #0e5346;
  --atlas-focus: #2564ce;
  --atlas-nav-height: 76px;
}
body.atlas-ui {
  background: var(--atlas-canvas);
  color: var(--atlas-ink);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
}
.atlas-ui .wrap { width: min(100% - 2rem, 1220px); }
.atlas-ui [hidden] { display: none !important; }
.atlas-ui :where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--atlas-focus); outline-offset: 3px; }
.atlas-ui :where(button, a, input, select, textarea, summary) { scroll-margin-top: calc(var(--atlas-nav-height) + 1rem); }
.atlas-ui :where(button, a, summary) { touch-action: manipulation; }
.atlas-ui :where(input[type="search"], input[type="text"], input[type="number"], textarea, select) { font-size: 1rem; }
.atlas-ui .skip-link {
  position: fixed; inset: .6rem auto auto .6rem; z-index: 50;
  padding: .65rem .9rem; color: #fff; background: #133e36; border-radius: .4rem;
  transform: translateY(-160%);
}
.atlas-ui .skip-link:focus { transform: translateY(0); }
.atlas-ui .atlas-header { background: #fbfdfc; border-bottom: 1px solid var(--atlas-line); }
.atlas-ui .atlas-header .top { min-height: 70px; gap: .7rem 1.2rem; }
.atlas-ui .atlas-header .brand { color: var(--atlas-ink); letter-spacing: -.045em; }
.atlas-ui .atlas-header nav a {
  color: var(--atlas-muted); padding: .58rem .68rem; border: 1px solid transparent;
  border-radius: .4rem; font-size: .91rem; line-height: 1.15; white-space: nowrap;
}
.atlas-ui .atlas-header nav a:hover { color: var(--atlas-teal-dark); background: #eff5f2; }
.atlas-ui .atlas-header nav a[aria-current="location"] { color: var(--atlas-teal-dark); background: #e3eeea; border-color: #cddfd8; }
.atlas-ui .primary, .atlas-ui .bench { color: #fff; background: var(--atlas-teal); border-color: var(--atlas-teal); }
.atlas-ui .primary:hover:not(:disabled), .atlas-ui .bench:hover:not(:disabled) { background: var(--atlas-teal-dark); border-color: var(--atlas-teal-dark); }
.atlas-ui .outline { color: var(--atlas-ink); border-color: #a6bdc1; background: #fbfdfc; }
.atlas-ui .outline:hover:not(:disabled) { background: #e7f1ee; border-color: #83aaa1; }
.atlas-ui .atlas-header select { background: #f2f7f5; color: var(--atlas-ink); border: 1px solid var(--atlas-line); color-scheme: light; }
.atlas-ui .atlas-header .language-select, .atlas-ui .atlas-header .forge-language { font-size: .84rem; margin: 0; }
.atlas-ui .atlas-header .language-select select { min-height: 2.5rem; padding-inline: .48rem; }
.atlas-ui footer { background: #e2ebe8; border-top: 1px solid var(--atlas-line); }
.atlas-ui footer .wrap { flex-wrap: wrap; }
@media (max-width: 960px) {
  :root { --atlas-nav-height: 124px; }
  .atlas-ui .atlas-header .top { padding-block: .65rem .5rem; }
  .atlas-ui .atlas-header .top nav { display: flex; margin: 0; gap: .22rem; }
}
@media (max-width: 520px) {
  :root { --atlas-nav-height: 146px; }
  .atlas-ui .wrap { width: calc(100% - 1.2rem); }
  .atlas-ui .atlas-header nav a { padding: .62rem .39rem; font-size: .8rem; }
  .atlas-ui .atlas-header .brand { font-size: 1.02rem; gap: .38rem; }
  .atlas-ui .atlas-header .brand img { width: 30px; height: 30px; }
  .atlas-ui .atlas-header .top-actions { flex-wrap: wrap; gap: .34rem; }
  .atlas-ui .atlas-header .bench { padding: .55rem .45rem; font-size: .76rem; }
  .atlas-ui .atlas-header .language-select span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .atlas-ui .atlas-header .language-select select { min-height: 2.2rem; padding: .24rem; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.atlas-ui) { scroll-behavior: auto; }
  .atlas-ui *, .atlas-ui *::before, .atlas-ui *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Rootcastle Engineering & Innovation colors. */
:root{--atlas-ink:#0b0d10;--atlas-muted:#505d6b;--atlas-canvas:#edf1f6;--atlas-line:#cad4e1;--atlas-teal:#0e3d8a;--atlas-teal-dark:#0b2f6c;--atlas-focus:#1767d2}
.atlas-ui .atlas-header nav a:hover { color:#0b2f6c; background:#eef3fc; }
.atlas-ui .atlas-header nav a[aria-current="location"] { color:#0b2f6c; background:#e5eefb; border-color:#c6d7f2; }
.atlas-ui footer{background:#e6edf6}
.atlas-ui .rootcastle-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;margin-inline-start:-.36rem}
.atlas-ui .rootcastle-mark img{display:block;width:3rem;height:3rem;object-fit:contain}
.atlas-ui .rootcastle-footer{font-weight:650;color:var(--atlas-teal)}
.atlas-ui .atlas-header .top{gap:.6rem}
.atlas-ui .atlas-header nav{gap:.4rem}
@media(max-width:520px){
 .atlas-ui .atlas-header .rootcastle-mark img{width:2.05rem;height:2.05rem}
 .atlas-ui .atlas-header .top{gap:.32rem}
}
