/* AEL documentation — docs.ael.openeng.ai
   One stylesheet, served under a content-hashed name. No framework, no
   external font, no network request of any kind. The tokens, header, footer
   and callout styles follow the AEL product site (palette from the AEL logo:
   emerald #10B981, cyan #0891B2, indigo #4338CA, ink #152634) so the two
   sites read as siblings. */

/* ---------- tokens ---------- */

:root {
  color-scheme: light dark;

  --bg: #FBFCFC;
  --surface: #F1F5F6;
  --surface-2: #E7EDEF;
  --border: #D7E0E4;
  --border-strong: #B9C7CE;
  --text: #152634;
  --muted: #4B5F6D;
  --link: #0A6C80;
  --accent: #0891B2;
  --accent-text: #0E7490;
  --emerald: #10B981;
  --indigo: #4338CA;

  --measure: 50rem;
  --shell: 76rem;
  --gutter: 1rem;
  --radius: 10px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "DejaVu Sans Mono", "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1620;
    --surface: #13202C;
    --surface-2: #1A2A38;
    --border: #263846;
    --border-strong: #3A4F60;
    --text: #E3ECF1;
    --muted: #9BB0BD;
    --link: #5FD0E8;
    --accent: #22D3EE;
    --accent-text: #22D3EE;
    --emerald: #34D399;
    --indigo: #A5B4FC;
  }
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }

/* ---------- skip link and focus ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--link);
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { display: block; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

/* The release banner: one line at the top of every page. */
.release-banner {
  margin: 0;
  padding: 0.55rem var(--gutter);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.site-header .wrap { padding-block: 0.9rem; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li { margin: 0; }

/* The brand leads the main navigation; the other entries follow it. */
.site-nav li:first-child { margin-right: auto; }

.site-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); border-bottom-color: var(--border-strong); }

.site-nav a[aria-current] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.site-nav a.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
  border-bottom: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img { width: 30px; height: 29px; }

.brand span { line-height: 1; }

.site-nav a.brand:hover { color: var(--link); }

/* ---------- article ---------- */

.doc {
  max-width: var(--measure);
  padding-block: 1.5rem 1rem;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.7rem;
  text-wrap: balance;
  scroll-margin-top: 1rem;
}

.doc h1 {
  font-size: clamp(1.8rem, 1.35rem + 1.9vw, 2.6rem);
  font-weight: 750;
  margin-top: 0.5rem;
}

h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 680; }
h4 { font-size: 1.05rem; font-weight: 650; }
h5, h6 { font-size: 1rem; font-weight: 650; color: var(--muted); }

p { margin: 0 0 1.05rem; }

a { color: var(--link); text-underline-offset: 0.18em; }

a:hover { text-decoration-thickness: 2px; }

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
}

/* The lead "Status:" paragraph of a page, styled like the product site's
   standing status strip. */
.doc p.status {
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-block: 1.25rem 1.75rem;
}

blockquote {
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 4px solid var(--border-strong);
  color: var(--muted);
}

blockquote > :last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 2.25rem;
}

del { color: var(--muted); }

/* ---------- lists ---------- */

ul, ol { padding-left: 1.4rem; margin: 0 0 1.05rem; }

li { margin-bottom: 0.35rem; }

li > ul, li > ol { margin: 0.35rem 0 0; }

/* ---------- code ---------- */

pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.55;
  tab-size: 4;
}

code { font-family: var(--mono); font-size: 0.9em; }

p code, li code, td code, th code, h2 code, h3 code, h4 code, blockquote code {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

pre code { background: none; padding: 0; font-size: inherit; }

/* ---------- tables ---------- */

.tablewrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tablewrap:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td { border-bottom: 0; }

thead th {
  background: var(--surface);
  border-bottom: 2px solid var(--border-strong);
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
}

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

/* ---------- schema lists ---------- */

.listing { list-style: none; padding-left: 0; margin-top: 1.5rem; }

.listing li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

/* A draft schema's mark, after its label. */
.listing .draft {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted);
  vertical-align: 0.1em;
}

/* The schema's $id, under its label. */
.listing .meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* A destination that is not published; a successful build contains none. */
.unpublished { text-decoration: underline dotted; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: 1.75rem 2.25rem;
}

.footer-nav ul {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-nav li { margin-bottom: 0.3rem; }

.footer-nav a { font-family: var(--mono); font-size: 0.85rem; }

.footer-note {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: var(--measure);
}

.footer-note:last-child { margin-bottom: 0; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  table { font-size: 0.88rem; }
}
