/* d2o PaaS docs — product chrome on top of the mdBook default theme */

/* THEME VALUES ARE COPIED, NOT LINKED. This stylesheet (and highlight.css)
   repeats the product's design-token VALUES as literals (#0b0617 bg, #a29bfe /
   #6c5ce7 accent, #e0e0e0 code text, Manrope, …) because the docs site does not
   load @d2o/styles/tokens.css. The dashboard enforces "tokens only" with
   d2o-paas-web/scripts/check-tokens.mjs; nothing enforces it here. When the
   product's visible refresh changes token values in
   d2o-paas-web/packages/styles/tokens.css, mirror the new values in this file
   and highlight.css by hand. */

/* Single-theme site: no theme picker. Markup stays (book.js's themes() IIFE
   unconditionally getElementById's these — deleting them throws and aborts
   every later IIFE in book.js). Hide instead; display:none also drops it
   from tab order and the popup can never be opened. */
#mdbook-theme-toggle,
#mdbook-theme-list { display: none; }

html { font-family: "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; }
body { font-weight: 500; line-height: 1.6; -webkit-font-smoothing: antialiased; }
/* Content column reads in Inter 400; headings + chrome/sidebar keep the product's Manrope */
main { font-family: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; font-weight: 400; }
main h1, main h2, main h3, main h4 { font-family: "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
/* NOTE: stock mdBook sets :root { font-size: 62.5% } — 1rem = 10px, NOT 16px.
   Every rem in this file is authored against that 10px root. */
h1 { font-size: 2.8rem; }

/* Menu bar: frosted sticky top bar like the dashboard */
#mdbook-menu-bar,
#mdbook-menu-bar-hover-placeholder { background: rgba(20, 15, 35, 0.8); backdrop-filter: blur(10px); }
#mdbook-menu-bar { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.menu-title { font-size: 2rem; font-weight: 600; }
.d2o-brand { color: #f8f6ff; text-decoration: none; }
.d2o-brand-docs {
    margin-left: 0.8rem; padding: 0.2rem 0.7rem; border-radius: 999px;
    background: rgba(108, 92, 231, 0.2); color: #a29bfe;
    font-size: 1.15rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    vertical-align: middle;
}

/* Sidebar: dashboard nav idiom (14px links / 13px nested / 12px labels) */
.chapter li.part-title {
    margin-top: 2rem; font-size: 1.2rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--sidebar-active);
}
.chapter li.chapter-item { margin: 0.25rem 0; }
.chapter li.chapter-item a {
    display: block; padding: 0.55rem 0.95rem; border-radius: 6px; color: #c9c3df;
    font-size: 1.4rem; /* absolute: stock chrome stacks em shrinks (0.875em × 0.8em nested) */
}
.chapter li.chapter-item a:hover { background: rgba(255, 255, 255, 0.05); color: #f8f6ff; text-decoration: none; }
/* Active page: colour + weight, no filled pill — the on-this-page rail below is the
   single "you are here" device, so the parent link stays quiet. */
.chapter li.chapter-item a.active { background: none; color: #a29bfe; font-weight: 600; }
.chapter li.chapter-item a.active:hover { background: rgba(255, 255, 255, 0.05); color: #a29bfe; }

/* Headings of the open page (ol.on-this-page > li.header-item, built by toc.js).
   Stock indents these 34px (22px margin + 4px rail + 8px padding) — one step is plenty. */
.on-this-page {
    margin-left: 0.95rem;        /* rail sits under the parent link's text */
    border-inline-start-width: 2px;
    padding-left: 0.5rem;
}
.chapter li.header-item a {
    display: block; padding: 0.35rem 0.5rem; border-radius: 6px;
    font-size: 1.3rem; font-weight: 500; color: #c9c3df;
}
.chapter li.header-item a:hover { background: rgba(255, 255, 255, 0.05); color: #f8f6ff; text-decoration: none; }
.chapter a.current-header { color: #a29bfe; font-weight: 600; }

/* Code: JetBrains Mono on the product code surface */
:not(pre) > code {
    background: rgba(255, 255, 255, 0.06); padding: 0.1em 0.4em; border-radius: 4px;
}
pre { border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.08); }
pre > .buttons button { border-radius: 4px; }

/* Cards-ish blockquotes, tables, rules */
blockquote { border-radius: 8px; }
.table-wrapper table { border-radius: 8px; overflow: hidden; }
table th {
    font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.05em; color: #c9c3df;
}
hr { border-color: rgba(255, 255, 255, 0.08); }

/* Focus ring — product a11y idiom */
:focus-visible { outline: 2px solid #a29bfe; outline-offset: 2px; }

/* Search */
#mdbook-searchbar { border-radius: 8px; }
mark { color: #ffffff; border-radius: 3px; padding: 0 2px; }
