/* Origami AsciiDoc documentation theme — clean minimal light. */

:root {
  --page: #ffffff;
  --sidebar: #f8f9fb;
  --ink: #1f2430;
  --muted: #5b6472;
  --line: #e6e8ec;
  --line-strong: #d6dae1;
  --accent: #0c79d8;
  --accent-strong: #0a62b2;
  --accent-soft: #eef6fe;
  --code-border: #e3e8ef;
  --code-ink: #2b3440;
  --font-sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.toc2 {
  padding-left: 280px;
  padding-top: 60px;
}

/* --------------------------------------------------------------------------
 * Site navigation (injected by docs.js, shared with the landing page)
 * ------------------------------------------------------------------------ */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  border-bottom: 1px solid var(--line);
  background: #faf6ec;
  padding: 0 28px;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.site-nav-brand img {
  width: 26px;
  height: 26px;
}

.site-nav-links {
  display: flex;
  gap: 6px;
}

.site-nav-links a {
  border-radius: 6px;
  color: #46557a;
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 12px;
  text-decoration: none;
}

.site-nav-links a:hover {
  background: #f0e9d6;
  color: var(--ink);
  text-decoration: none;
}

.site-nav-links a[aria-current="page"] {
  background: var(--ink);
  color: #faf6ec;
}

@media (max-width: 980px) {
  .site-nav {
    padding: 0 18px;
  }
}

::selection {
  background: rgba(12, 121, 216, 0.16);
}

a,
a:visited {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
.tocChevron:focus-visible {
  outline: 2px solid rgba(12, 121, 216, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

#header,
#content,
#footer {
  max-width: 860px;
  margin: 0 auto;
  padding-right: min(6vw, 72px);
  padding-left: min(6vw, 72px);
}

/* --------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------ */

#header {
  padding-top: 64px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

#header::before {
  content: "C++20 build orchestration";
  display: inline-flex;
  margin-bottom: 20px;
  border: 1px solid rgba(12, 121, 216, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 12px;
}

#header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

#header .details {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
 * Table of contents (left sidebar)
 * ------------------------------------------------------------------------ */

#toc.toc2 {
  position: fixed;
  inset: 60px auto 0 0;
  width: 280px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  padding: 28px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

#toctitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

#toctitle::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: url("public/favicon.svg") center / 18px 18px no-repeat, #ffffff;
}

#toc ul,
#toc li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#toc ul {
  display: grid;
  gap: 2px;
}

.tocSectionRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 2px;
  align-items: center;
}

#toc .sectlevel2,
#toc .sectlevel3 {
  margin-left: 12px;
  border-left: 1px solid var(--line-strong);
  padding: 4px 0 6px 10px;
}

#toc a,
#toc a:visited {
  display: block;
  border-radius: 6px;
  color: #526070;
  font-size: 14.5px;
  line-height: 1.3;
  padding: 6px 9px;
  text-decoration: none;
}

#toc > ul > li > a,
#toc > ul > li > a:visited,
.tocSectionRow > a,
.tocSectionRow > a:visited {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  padding: 8px 9px;
}

#toc .sectlevel2 a,
#toc .sectlevel3 a {
  color: #526070;
  font-size: 14px;
}

#toc a:hover,
#toc a:focus-visible {
  background: #edf1f6;
  color: var(--accent-strong);
  text-decoration: none;
}

.tocChevron {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b95a3;
  cursor: pointer;
}

.tocChevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.tocChevron[aria-expanded="false"]::before {
  transform: rotate(-45deg);
}

.tocChevron:hover {
  background: #e6ebf2;
  color: var(--accent-strong);
}

/* Accordion panels animate their height through a 0fr -> 1fr grid row. */
.tocSection {
  display: grid;
  grid-template-rows: auto 0fr;
  transition: grid-template-rows 220ms ease;
}

.tocSection.isExpanded {
  grid-template-rows: auto 1fr;
}

.tocSection > ul {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
}

.tocSection.isExpanded > ul {
  visibility: visible;
}

/* --------------------------------------------------------------------------
 * Content
 * ------------------------------------------------------------------------ */

#content {
  padding-top: 44px;
  padding-bottom: 96px;
}

#preamble {
  margin-bottom: 40px;
}

.lead p {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(20px, 2.4vw, 23px);
  line-height: 1.55;
}

.semantic-summary p {
  max-width: 680px;
  margin: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  padding: 16px 20px;
}

.sect1 {
  padding: 52px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.sect1:first-of-type {
  padding-top: 24px;
}

.sect2 {
  margin-top: 36px;
  scroll-margin-top: 24px;
}

.sect3 {
  margin-top: 28px;
}

h2,
h3,
h4,
h5 {
  color: var(--ink);
  font-family: inherit;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 18px;
  font-size: 33px;
  font-weight: 750;
  line-height: 1.15;
}

h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.25;
}

h4 {
  margin: 0 0 10px;
  font-size: 17.5px;
  font-weight: 600;
}

p {
  margin: 0 0 15px;
}

li p {
  margin: 0 0 8px;
}

.paragraph + .listingblock,
.paragraph + .literalblock,
.dlist + .listingblock,
.ulist + .listingblock {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
 * Code
 * ------------------------------------------------------------------------ */

code {
  border: 1px solid var(--code-border);
  border-radius: 5px;
  background: #f1f5fa;
  color: #274b66;
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 0.1em 0.35em;
}

.listingblock,
.literalblock {
  margin: 20px 0;
}

.listingblock > .content,
.literalblock > .content {
  position: relative;
}

pre {
  overflow-x: auto;
  margin: 0;
  border: 1px solid #e7e9eb;
  border-radius: 10px;
  background: linear-gradient(135deg, #f6f7f8 0%, #e3e5e7 100%);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  padding: 18px 20px;
  position: relative;
}

/* Language label pinned to the top-right corner of source blocks. */
pre > code[data-lang]::after {
  content: attr(data-lang);
  position: absolute;
  top: 9px;
  right: 14px;
  color: #97a1af;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
}

pre > code[data-lang="text"]::after {
  content: none;
}

pre code {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

/* --------------------------------------------------------------------------
 * Syntax highlighting (highlight.js, GitHub-light inspired palette)
 * ------------------------------------------------------------------------ */

.hljs-comment {
  color: #6e7781;
  font-style: italic;
}

.hljs-keyword {
  color: #cf222e;
}

.hljs-literal {
  color: #0550ae;
}

.hljs-section {
  color: #8250df;
  font-weight: 600;
}

.hljs-string {
  color: #0a3069;
}

.hljs-number {
  color: #0550ae;
}

.hljs-attr {
  color: #116329;
}

.hljs-title {
  color: #8250df;
}

.hljs-variable {
  color: #953800;
  font-weight: 600;
}

.hljs-meta {
  color: #953800;
}

.hljs-built_in,
.hljs-selector-tag,
.hljs-tag {
  color: #116329;
}

.hljs-type,
.hljs-class .hljs-title {
  color: #953800;
}

.hljs-escape {
  color: #0550ae;
}

/* --------------------------------------------------------------------------
 * Lists and definition lists
 * ------------------------------------------------------------------------ */

.ulist ul,
.olist ol {
  padding-left: 1.4rem;
}

.ulist li,
.olist li {
  margin: 4px 0;
}

.ulist li::marker,
.olist li::marker {
  color: var(--accent);
  font-weight: 700;
}

.dlist dt,
.hdlist .hdlist1 {
  color: var(--ink);
  font-weight: 650;
}

.dlist dd {
  margin: 0 0 14px;
  color: var(--muted);
}

.dlist dd p {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
 * Tables
 * ------------------------------------------------------------------------ */

table.tableblock {
  width: 100%;
  overflow: hidden;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
}

table.tableblock th,
table.tableblock td {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

table.tableblock tr:last-child td {
  border-bottom: 0;
}

table.tableblock th {
  background: var(--sidebar);
  border-bottom: 1px solid var(--line-strong);
  color: #3c4654;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

table.tableblock td {
  color: var(--ink);
  font-size: 16.5px;
}

/* --------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */

@media (max-width: 980px) {
  body.toc2 {
    padding-left: 0;
  }

  #toc.toc2 {
    position: static;
    width: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #toc > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #header,
  #content,
  #footer {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 640px) {
  #header {
    padding-top: 40px;
  }

  #header h1 {
    font-size: clamp(38px, 9vw, 48px);
  }

  #toc > ul {
    grid-template-columns: 1fr;
  }

  .sect1 {
    padding: 40px 0;
  }

  h2 {
    font-size: 28px;
  }

  pre {
    font-size: 14px;
  }
}
