/* Assembly Atlas docs (docs.assemblyatlas.com). Same tokens as packages/ui/theme.css, kept here so the docs
   stand alone on their own host. */
:root {
  --bg: #eef1f2; --panel: #ffffff; --panel-2: #f6f8f9; --ink: #141a1f; --muted: #5b6771; --line: #d2d9de; --rule: #a3aeb6;
  --accent: #f2a900; --accent-ink: #8a5d00; --accent-soft: #fdf1cf; --code-bg: #f3f5f6; --warn: #b5620a;
  --f-display: 'IBM Plex Sans Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1215; --panel: #151a1e; --panel-2: #1a2025; --ink: #e6ebee; --muted: #94a0a9; --line: #29323a; --rule: #4c5862;
    --accent: #f2b233; --accent-ink: #f2b233; --accent-soft: #3a2f17; --code-bg: #1a2025; --warn: #f0a24a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1215; --panel: #151a1e; --panel-2: #1a2025; --ink: #e6ebee; --muted: #94a0a9; --line: #29323a; --rule: #4c5862;
  --accent: #f2b233; --accent-ink: #f2b233; --accent-soft: #3a2f17; --code-bg: #1a2025; --warn: #f0a24a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--f-body); -webkit-text-size-adjust: 100%; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.in { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); }

header.top { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 1px solid var(--line); }
header.top .in { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font: 700 19px var(--f-display); letter-spacing: .01em; }
.brand svg { width: 26px; height: 26px; }
.brand .sub { font: 500 13px var(--f-mono); color: var(--muted); border-left: 1px solid var(--line); padding-left: 9px; margin-left: 2px; }
header.top nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
header.top nav a { color: var(--ink); text-decoration: none; font: 600 14.5px var(--f-display); letter-spacing: .02em; }
header.top nav a:hover { color: var(--accent-ink); }
.menu-btn { display: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 6px; padding: 6px 11px; font: 600 14px var(--f-display); }

.layout { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 48px; }
aside.side { position: sticky; top: 58px; align-self: start; max-height: calc(100vh - 58px); overflow-y: auto; padding: 28px 0 32px; }
aside.side ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
aside.side li { counter-increment: s; }
aside.side li a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
aside.side li a::before { content: counter(s, decimal-leading-zero); font: 500 11.5px/1.75 var(--f-mono); color: var(--muted); }
aside.side li a:hover { background: var(--panel-2); }
aside.side li a[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }
aside.side li a[aria-current="page"]::before { color: var(--accent-ink); }
.side .group { font: 600 11.5px var(--f-display); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 18px 10px 6px; }
.side .group:first-child { margin-top: 0; }
.side .help { font-size: 13.5px; color: var(--muted); margin: 22px 10px 0; }

main { min-width: 0; padding: 36px 0 64px; }
article { max-width: 760px; }
.eyebrow { font: 500 12.5px var(--f-mono); color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 24px; height: 1.5px; background: var(--accent); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(32px, 4.4vw, 44px); margin: 0 0 14px; letter-spacing: -.005em; }
.lede { font-size: 18.5px; color: var(--muted); margin: 0 0 30px; max-width: 62ch; }
h2 { font-size: 25px; margin: 44px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
h3 { font-size: 19px; margin: 28px 0 8px; }
h2 a.anchor, h3 a.anchor { color: var(--rule); text-decoration: none; margin-left: 8px; font-weight: 500; opacity: 0; }
h2:hover a.anchor, h3:hover a.anchor { opacity: 1; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
li > ul, li > ol { margin: 4px 0 0; }
strong { font-weight: 600; }
code { font: 14px var(--f-mono); background: var(--code-bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
pre { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 18px; }
pre code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.6; white-space: pre; overflow-wrap: normal; }
pre .copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 5px; padding: 3px 9px; font: 600 12px var(--f-display); letter-spacing: .03em; cursor: pointer; opacity: .85; }
pre .copy:hover { opacity: 1; border-color: var(--muted); }
kbd { font: 12.5px var(--f-mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--panel); }

.tw { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
th { font: 600 12px var(--f-display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
td.yes { color: var(--ink); font-weight: 600; }
td.no { color: var(--muted); }

.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel); border-radius: 6px; padding: 12px 16px; margin: 0 0 18px; font-size: 15px; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note.warn { border-left-color: var(--warn); }
.steps { counter-reset: st; list-style: none; padding: 0; }
.steps > li { counter-increment: st; position: relative; padding-left: 40px; margin: 0 0 14px; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--rule); display: grid; place-items: center; font: 500 13px var(--f-mono); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 22px; }
.cards a { display: block; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; font: 600 17px var(--f-display); margin-bottom: 3px; }
.cards span { font-size: 14px; color: var(--muted); line-height: 1.45; display: block; }

nav.next { max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
nav.next a { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 12px 16px; text-decoration: none; color: var(--ink); font: 600 17px var(--f-display); }
nav.next a:hover { border-color: var(--accent); }
nav.next small { display: block; font: 500 12px var(--f-mono); color: var(--muted); margin-bottom: 2px; }
nav.next a.r { text-align: right; grid-column: 2; }

footer { border-top: 1px solid var(--line); background: var(--panel); }
footer .in { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); font-size: 14px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .menu-btn { display: inline-block; }
  header.top nav .hide-sm { display: none; }
  aside.side { position: fixed; top: 58px; left: 0; right: 0; bottom: 0; max-height: none; align-self: stretch; z-index: 9; background: var(--bg); padding: 18px 16px 32px; display: none; }
  body.nav-open aside.side { display: block; }
  body.nav-open { overflow: hidden; }
  main { padding-top: 24px; }
  h2 { font-size: 22px; }
  .lede { font-size: 17px; }
  nav.next { grid-template-columns: 1fr; }
  nav.next a.r { grid-column: 1; }
}
@media print {
  header.top, aside.side, nav.next, footer, pre .copy { display: none !important; }
  .layout { display: block; }
}
