/* DAEdalus documentation site (generated by build-docs.mjs). Colours follow the workbench. */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --fg: #1d2330;
  --muted: #6b7385;
  --line: #d9dde5;
  --code-bg: #f1f3f7;
  --accent: #0b5fff;
  --accent-soft: #e7efff;
  --new: #2b8a3e;
  --new-soft: #e6f4ea;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181e;
    --panel: #1c2028;
    --fg: #e3e6ec;
    --muted: #8a92a5;
    --line: #2d333f;
    --code-bg: #232833;
    --accent: #5b8cff;
    --accent-soft: #233150;
    --new: #69db7c;
    --new-soft: #1f3a27;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 64px; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 650; font-size: 17px; color: var(--fg); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 4px;
  border-radius: 6px; background: #1f4e79; color: white; font-size: 15px;
}
.dim { color: var(--muted); font-weight: 400; }
.grow { flex: 1; }
.btn {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px;
  color: var(--fg); font-size: 14px; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.menu { display: none; background: none; border: 0; color: var(--fg); font-size: 20px; cursor: pointer; }

.shell {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px;
  max-width: 1440px; margin: 0 auto;
}
.side, .toc {
  position: sticky; top: 52px; align-self: start;
  max-height: calc(100vh - 52px); overflow-y: auto; padding: 24px 16px;
  font-size: 14px;
}
.nav-group { margin-bottom: 18px; }
.nav-title {
  font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin-bottom: 6px;
}
.side a, .toc a { display: block; padding: 3px 10px; border-radius: 5px; color: var(--fg); }
.side a:hover, .toc a:hover { background: var(--accent-soft); text-decoration: none; }
.side a.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc a { color: var(--muted); padding: 2px 8px; }
.toc a.d3 { padding-left: 20px; font-size: 13px; }

.content { padding: 28px 40px 60px; min-width: 0; }
article { max-width: 900px; }
article h1 { font-size: 34px; line-height: 1.2; margin: 4px 0 18px; }
article h2 { font-size: 24px; margin: 40px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
article h3 { font-size: 19px; margin: 28px 0 8px; }
article h4 { font-size: 16px; margin: 20px 0 6px; }
.anchor { float: left; margin-left: -20px; width: 20px; color: var(--muted); opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: 1; text-decoration: none; }
article p, article li { max-width: 78ch; }
article li { margin: 3px 0; }
code { font: 0.88em var(--mono); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; overflow-x: auto; font-size: 14px; line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: inherit; }
blockquote { margin: 16px 0; padding: 8px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
blockquote p { margin: 6px 0; }
.table-wrap { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; font-size: 14.5px; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: var(--code-bg); }
td[align="right"], th[align="right"] { text-align: right; }

figure { margin: 18px 0; }
figure img, video {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.zoom { cursor: zoom-in; }
video { width: 100%; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.82); cursor: zoom-out; padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* Side-by-side images and feature cards, written as raw HTML in the Markdown. */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.pair figure { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0; }
.card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--fg);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 40%; border-bottom: 1px solid var(--line); }
.card b { display: block; padding: 10px 14px 2px; font-size: 16px; }
.card > span { display: block; padding: 0 14px 12px; font-size: 14px; color: var(--muted); }
.card b .new { margin-left: 4px; }
.new {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--new); background: var(--new-soft); border-radius: 4px; padding: 1px 6px; vertical-align: 2px;
}
.hero { margin: 0 0 8px; font-size: 19px; color: var(--muted); max-width: 70ch; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.cta a { padding: 8px 16px; font-size: 15px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; max-width: 900px; }
.pager a {
  flex: 1; max-width: 50%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--fg);
}
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager a span { display: block; font-size: 13px; color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }
.edit { font-size: 14px; margin-top: 24px; }

@media (max-width: 1200px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu { display: block; }
  .side {
    display: none; position: fixed; top: 52px; left: 0; bottom: 0; width: 280px; z-index: 20;
    max-height: none; background: var(--panel); border-right: 1px solid var(--line);
  }
  body.nav-open .side { display: block; }
  .content { padding: 20px 16px 48px; }
  .top .btn:not(.primary), .brand .dim { display: none; }
  .pair { grid-template-columns: 1fr; }
  article h1 { font-size: 28px; }
}
