Files
cleveragents-core/docs/stylesheets/extra.css
T
Jeffrey Phillips Freeman 339b7de700
CI / lint (push) Successful in 15s
CI / typecheck (push) Successful in 30s
CI / security (push) Successful in 24s
CI / quality (push) Successful in 16s
CI / integration_tests (push) Successful in 5m6s
CI / build (push) Successful in 15s
CI / unit_tests (push) Successful in 16m32s
CI / docker (push) Successful in 9s
CI / coverage (push) Has been cancelled
Docs: Added ADRs and improved TOC handling
2026-02-16 22:11:01 -05:00

337 lines
10 KiB
CSS

.md-typeset .highlight,
.md-typeset .highlight pre,
.md-typeset .highlight code {
background-color: #000;
color: #fff;
}
/* --- Section heading hierarchy -------------------------------------------
*
* Goals:
* - Every heading level is noticeably larger than its body text.
* - Higher-level headings are progressively larger than lower ones.
* - H1 is prominent but not oversized.
* - Lower-level headings (H4-H6) are bold/italic so they still read as
* headings even though their absolute size is smaller.
*
* Base body text in .md-typeset is 0.8 rem (~12.8 px).
* The scale below keeps every heading clearly above that baseline while
* maintaining a visible step between adjacent levels.
* ----------------------------------------------------------------------- */
.md-typeset h1 {
font-size: 2em; /* ~25.6 px */
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.25;
margin: 0 0 0.75em;
color: var(--md-default-fg-color);
}
.md-typeset h2 {
font-size: 1.7em; /* ~21.8 px */
font-weight: 600;
letter-spacing: -0.015em;
line-height: 1.3;
margin: 1.4em 0 0.6em;
border-bottom: 1px solid var(--md-default-fg-color--lightest);
padding-bottom: 0.3em;
}
.md-typeset h3 {
font-size: 1.4em; /* ~17.9 px */
font-weight: 600;
letter-spacing: -0.01em;
line-height: 1.35;
margin: 1.4em 0 0.6em;
border-bottom: 1px solid var(--md-default-fg-color--lightest);
padding-bottom: 0.3em;
}
.md-typeset h4 {
font-size: 1.2em; /* ~15.4 px */
font-weight: 700;
line-height: 1.4;
margin: 1.2em 0 0.5em;
border-bottom: 1px solid var(--md-default-fg-color--lightest);
padding-bottom: 0.3em;
}
.md-typeset h5 {
font-size: 1.15em; /* ~14.7 px */
font-weight: 700;
font-style: italic;
text-transform: none;
line-height: 1.4;
margin: 1.2em 0 0.4em;
border-bottom: 1px solid var(--md-default-fg-color--lightest);
padding-bottom: 0.3em;
}
.md-typeset h6 {
font-size: 1.1em; /* ~14.1 px */
font-weight: 700;
font-style: italic;
text-transform: none;
letter-spacing: 0.01em;
line-height: 1.4;
margin: 1.1em 0 0.4em;
border-bottom: 1px solid var(--md-default-fg-color--lightest);
padding-bottom: 0.3em;
color: var(--md-default-fg-color);
}
/* --- Compact table cells --------------------------------------------------
*
* MkDocs Material's default table padding is generous. Tighten it so
* wide tables (e.g. the automation-profile matrix) render without
* forcing column headers to word-wrap.
* ----------------------------------------------------------------------- */
/* First column never wraps — sized to its content. */
.md-typeset table:not([class]) th:first-child,
.md-typeset table:not([class]) td:first-child {
white-space: nowrap;
}
.md-typeset table:not([class]) th {
min-width: 0;
}
/* --- Primary nav section collapse fix -----------------------------------------
*
* Material's native checkbox-based toggle for nav sections (Reference,
* Development, Architecture Decisions, etc.) must fully hide children
* when unchecked. Without this, the <nav> container retains residual
* height from padding/grid-rows even when the checkbox is unchecked,
* causing visible whitespace below collapsed section headings.
* ----------------------------------------------------------------------- */
/* Fully hide children of unchecked primary nav sections */
.md-sidebar--primary .md-nav__item--nested > .md-nav__toggle:not(:checked) ~ .md-nav {
display: none;
}
/* --- Leaf-page nav items: section-like behaviour ----------------------------
*
* toc-collapse.js converts ALL leaf-page nav items in the primary sidebar
* into section-like DOM structures so every page gets an expand/collapse
* chevron. This applies to both top-level single-page items (Specification,
* Work Remaining, FAQ) and children within sections (Action CLI, Session
* Model, ADR-001, etc.).
*
* INACTIVE pages are converted into a checkbox + label + nested-nav
* structure identical to Material's sections. The page's TOC is
* lazy-loaded into the nested nav on first expand.
*
* ACTIVE pages (the page you're currently viewing) are converted into
* an always-expanded, non-collapsible section. The __toc checkbox and
* label are hidden, the <a> is replaced with a non-navigating <label>
* matching native section heading structure, and the TOC
* (md-nav--secondary) is forced visible.
* ----------------------------------------------------------------------- */
/* -- Active page item: always-expanded section appearance -----------------
*
* toc-collapse.js converts the active page item (at any level in the nav
* tree) into a non-collapsible section. The __toc checkbox and label are
* hidden, the <a> is replaced with a <label> that matches native section
* heading structure, and the TOC (md-nav--secondary) is forced visible.
*
* The marker class .md-nav__item--section-page is added by JS.
* ----------------------------------------------------------------------- */
/* Force the TOC always visible (JS also sets inline style as fallback) */
.md-nav__item--section-page > .md-nav--secondary {
display: block !important;
}
/* Rotate the chevron to point downward (expanded state), matching the
* native rotation rule for checked section toggles. */
.md-nav__item--section-page > .md-nav__link > .md-nav__icon::after {
transform: rotate(90deg);
}
/* -- Lazy-loaded TOC placeholder -- */
.md-nav__toc-placeholder {
padding: .4rem .8rem;
font-size: .64rem;
opacity: .6;
}
/* --- Collapsible TOC in integrated sidebar --- */
/* Container for the link row: link text + toggle chevron side by side.
* Scoped to .md-nav--secondary (active page TOC) and .md-nav--page-toc
* (lazy-loaded TOC in converted single-page nav items) so it does not
* affect primary nav section headings which use Material's native
* <label> + checkbox. */
.md-nav--secondary .md-nav__item--nested > .md-nav__link,
.md-nav--page-toc .md-nav__item--nested > .md-nav__link {
display: flex;
align-items: center;
}
/* Chevron toggle button injected by JS into TOC sub-items.
* Styled to match Material's native .md-nav__icon chevron exactly so
* all expand/collapse indicators look the same across the sidebar. */
.toc-toggle {
flex-shrink: 0;
width: .9rem;
height: .9rem;
margin-left: auto;
cursor: pointer;
border: none;
background: none;
border-radius: 100%;
transition: background-color .25s;
}
.toc-toggle:hover {
background-color: var(--md-accent-fg-color--transparent);
}
/* Use the same SVG mask-image chevron as Material's .md-nav__icon::after */
.toc-toggle::after {
content: "";
display: inline-block;
width: 100%;
height: 100%;
background-color: currentcolor;
border-radius: 100%;
-webkit-mask-image: var(--md-nav-icon--next);
mask-image: var(--md-nav-icon--next);
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: contain;
mask-size: contain;
vertical-align: -.1rem;
transition: transform .25s;
/* Default: expanded (pointing down) */
transform: rotate(90deg);
}
/* Rotate arrow to point right when collapsed */
.toc-collapsed > .md-nav__link > .toc-toggle::after {
transform: rotate(0deg);
}
/* Hide nested nav list when collapsed (TOC items only) */
.md-nav--secondary .md-nav__item--nested.toc-collapsed > .md-nav,
.md-nav--page-toc .md-nav__item--nested.toc-collapsed > .md-nav {
display: none;
}
/* Show nested nav when expanded (TOC items only) */
.md-nav--secondary .md-nav__item--nested > .md-nav,
.md-nav--page-toc .md-nav__item--nested > .md-nav {
display: block;
}
/* --- Diagram lightbox (fullscreen on click) --------------------------------
*
* Kroki diagrams (<img alt="Kroki">) get a pointer cursor to hint they are
* clickable. Clicking one opens a fullscreen overlay with the diagram
* scaled to fill the viewport. An X button or the Escape key closes it.
* ----------------------------------------------------------------------- */
/* Make diagram images look clickable */
img[alt="Kroki"] {
cursor: zoom-in;
transition: opacity 0.15s ease;
}
img[alt="Kroki"]:hover {
opacity: 0.85;
}
/* Fullscreen overlay */
.diagram-lightbox {
position: fixed;
inset: 0;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.88);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
padding: 2rem;
}
.diagram-lightbox.active {
opacity: 1;
visibility: visible;
}
/* The enlarged diagram image */
.diagram-lightbox img {
max-width: 95vw;
max-height: 92vh;
object-fit: contain;
border-radius: 4px;
/* Invert for dark backgrounds so SVG lines stay visible */
filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.5));
background: #fff;
padding: 1rem;
}
/* Close button */
.diagram-lightbox-close {
position: absolute;
top: 1rem;
right: 1.5rem;
width: 2.5rem;
height: 2.5rem;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 50%;
color: #fff;
font-size: 1.5rem;
line-height: 1;
cursor: pointer;
transition: background 0.15s ease, transform 0.15s ease;
z-index: 10000;
}
.diagram-lightbox-close:hover {
background: rgba(255, 255, 255, 0.3);
transform: scale(1.1);
}
.diagram-lightbox-close:active {
transform: scale(0.95);
}
/* ── ADR Admonition ──────────────────────────────────────────────── */
:root {
--md-admonition-icon--adr: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v7h7v9H6z"/><path d="M8 14h8v2H8zm0-3h8v2H8z"/></svg>');
}
.md-typeset .admonition.adr,
.md-typeset details.adr {
border-color: #7c4dff;
}
.md-typeset .adr > .admonition-title,
.md-typeset .adr > summary {
background-color: rgba(124, 77, 255, 0.1);
}
.md-typeset .adr > .admonition-title::before,
.md-typeset .adr > summary::before {
background-color: #7c4dff;
-webkit-mask-image: var(--md-admonition-icon--adr);
mask-image: var(--md-admonition-icon--adr);
}