before article content.
aria-current="page" marks the active section. No classes needed. */
[data-subnav] {
display: flex;
align-items: center;
font-family: var(--font-mono);
font-size: var(--text-sm);
margin-bottom: var(--space-6);
padding-bottom: var(--space-3);
border-bottom: var(--border-width) solid var(--border);
}
[data-subnav] a {
color: var(--text-dim);
text-decoration: none;
transition: color var(--ease);
}
[data-subnav] a + a::before {
content: "/";
color: var(--border);
margin: 0 0.6rem;
}
[data-subnav] a:hover {
color: var(--text);
}
[data-subnav] a[aria-current="page"] {
color: var(--text);
}
/* ══════════════════════════════════════════════════════════════════════════
data-diff — CSS diff viewer for code review and comparison output
Issue: agentic-semantic-web#52
══════════════════════════════════════════════════════════════════════════ */
[data-diff] {
font-family: var(--font-mono);
font-size: var(--text-sm);
background: var(--surface-1);
border: var(--border-width) solid var(--border);
border-radius: var(--radius-md);
overflow-x: auto;
margin: var(--space-5) 0;
padding: 0;
}
/* File header */
[data-diff-file] {
display: block;
background: var(--surface-card);
border-bottom: 1px solid var(--border);
padding: 0.4em 1em;
font-size: var(--text-xs);
color: var(--text-3);
letter-spacing: 0.02em;
}
/* Individual diff lines */
[data-diff-line] {
display: block;
padding: 0.15em 1em 0.15em 3em;
position: relative;
line-height: 1.6;
white-space: pre;
}
/* Prefix gutter marker */
[data-diff-line]::before {
position: absolute;
left: 1em;
width: 1.5em;
text-align: center;
}
[data-diff-line="added"] {
background: var(--diff-add-bg);
color: var(--syntax-string);
}
[data-diff-line="added"]::before {
content: "+";
color: var(--ok);
}
[data-diff-line="removed"] {
background: var(--diff-remove-bg);
color: var(--diff-remove-text);
}
[data-diff-line="removed"]::before {
content: "−";
color: var(--syntax-deleted);
}
[data-diff-line="context"] {
color: var(--text-3);
}
[data-diff-line="context"]::before {
content: " ";
}
/* Hunk header — @@ line markers */
[data-diff-line="hunk"] {
background: var(--diff-hunk-bg);
color: var(--accent-blue);
font-style: italic;
}
[data-diff-line="hunk"]::before {
content: "@@";
font-style: normal;
color: var(--accent-blue);
opacity: 0.6;
}
/* ══════════════════════════════════════════════════════════════════════════
data-redacted — privacy-aware redaction styling
Issue: agentic-semantic-web#55
══════════════════════════════════════════════════════════════════════════ */
/* Base: fully redacted — black bar, not selectable */
[data-redacted] {
background: var(--text);
color: transparent;
border-radius: var(--radius-sm);
user-select: none;
/* Screen reader replacement handled via aria-label on element */
}
/* Block-level redaction */
[data-redacted]:is(p, div, section, article, li) {
display: block;
min-height: 1.2em;
}
/* Variant: reveal on hover/focus */
[data-redacted="reveal"] {
cursor: pointer;
transition: background var(--ease), color var(--ease);
}
[data-redacted="reveal"]:hover,
[data-redacted="reveal"]:focus {
background: var(--surface-card);
color: var(--text);
outline: var(--border-width) solid var(--border);
border-radius: var(--radius-sm);
user-select: text;
}
/* Variant: label — shows [REDACTED] text */
[data-redacted="label"] {
background: var(--surface-1);
color: var(--text-dim);
font-family: var(--font-mono);
font-size: 0.85em;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 0 0.35em;
user-select: none;
}
[data-redacted="label"]::before {
content: "[REDACTED]";
}
[data-redacted="label"] > * {
display: none;
}
/* Light mode adjustments */
@media (prefers-color-scheme: light) {
[data-redacted] {
background: var(--absolute-black);
}
[data-redacted="reveal"]:hover,
[data-redacted="reveal"]:focus {
background: var(--surface-1);
color: var(--absolute-black);
}
}
/* ══════════════════════════════════════════════════════════════════════════
data-reading-progress — CSS-only scroll progress bar
Issue: agentic-semantic-web#53
══════════════════════════════════════════════════════════════════════════ */
@keyframes asw-reading-progress {
from { width: 0%; }
to { width: 100%; }
}
[data-reading-progress]::before {
content: "";
position: fixed;
top: 0;
left: 0;
height: var(--focus-ring-width);
background: var(--accent);
z-index: 9999;
/* Subtle shadow so bar is visible on light pages too */
box-shadow: 0 0 6px var(--accent-focus);
}
/* animation-timeline: scroll() — fills as the page scrolls.
Guarded: skip for users who prefer reduced motion. */
@media (--motionOK) {
[data-reading-progress]::before {
animation: asw-reading-progress auto linear;
animation-timeline: scroll(root);
}
}
/* ══════════════════════════════════════════════════════════════════════════
ai-disclosure — styling for AI content disclosure attributes
Issue: agentic-semantic-web#58
══════════════════════════════════════════════════════════════════════════ */
/* Subtle accent on AI-generated sections — light left border indicator */
[data-ai-disclosure] {
border-left: var(--focus-ring-width) solid transparent;
padding-left: var(--space-3);
}
[data-ai-disclosure="ai-generated"] {
border-left-color: var(--ai-generated-border);
}
[data-ai-disclosure="ai-assisted"] {
border-left-color: var(--ai-assisted-border);
}
/* Autonomous — more distinct: full accent treatment */
[data-ai-disclosure="autonomous"] {
border-left-color: var(--accent);
border-left-width: var(--focus-ring-width);
}
/* Mixed — yellow/amber to signal blended provenance */
[data-ai-disclosure="mixed"] {
border-left-color: var(--ai-mixed-border);
}
/* Disclosure badge — optional ::after label for verbose mode */
[data-ai-disclosure][data-show-disclosure]::after {
content: " [" attr(data-ai-disclosure) "]";
font-family: var(--font-mono);
font-size: var(--text-xs);
color: var(--text-dim);
vertical-align: super;
font-size: 0.65em;
}
/* ── CTA buttons: data-role on ─────────────────────────────────────── */
/* Agents write naturally. data-role styles intent without class names. */
a[data-role="primary"] {
display: inline-flex;
align-items: center;
padding: var(--space-2) var(--space-5);
background: var(--accent);
color: var(--on-accent);
border-radius: var(--radius-md);
font-weight: 500;
text-decoration: none;
transition: background var(--duration-quick-2) var(--ease-1);
}
a[data-role="primary"]:hover {
background: var(--accent-hover);
color: var(--on-accent);
text-decoration: none;
}
a[data-role="secondary"] {
display: inline-flex;
align-items: center;
padding: var(--space-2) var(--space-5);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-2);
text-decoration: none;
transition: border-color var(--duration-quick-2) var(--ease-1), color var(--duration-quick-2) var(--ease-1);
}
a[data-role="secondary"]:hover {
border-color: var(--accent);
color: var(--text);
text-decoration: none;
}
/* ── Badge atom ────────────────────────────────────────────────────────────── */
/* Icon badge / token pill. token. */
[data-badge] {
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: var(--space-2) var(--space-3);
font-family: var(--font-mono);
font-size: var(--text-xs);
color: var(--accent);
margin-bottom: var(--space-3);
}
/* ══════════════════════════════════════════════════════════════════════════
data-size — universal size modifier axis
Issue: lineage-ingestion / Semantic UI modifier grammar
Scales font-size, padding, and gap on any component.
Inherit-safe: child elements scale relative to the component root.
Usage:
token
…
Big CTA
Values: xs / sm / md (default, no-op) / lg / xl
══════════════════════════════════════════════════════════════════════════ */
[data-size="xs"] {
font-size: var(--font-size-00, 0.6rem);
padding: var(--space-1) var(--space-2);
gap: var(--space-1);
}
[data-size="sm"] {
font-size: var(--text-xs);
padding: var(--space-1) var(--space-4);
gap: var(--space-2);
}
/* md is the default — explicit reset for override contexts */
[data-size="md"] {
font-size: var(--text-base);
padding: var(--space-2) var(--space-4);
gap: var(--space-3);
}
[data-size="lg"] {
font-size: var(--text-2xl);
padding: var(--space-3) var(--space-5);
gap: var(--space-4);
}
[data-size="xl"] {
font-size: var(--text-3xl);
padding: var(--space-4) var(--space-5);
gap: var(--space-5);
}
/* ── Demo block ────────────────────────────────────────────────────── */
/* Inline demonstration area within docs pages.
Usage: …live HTML example…
*/
[data-demo] {
border: var(--border-width) solid var(--border);
border-radius: var(--radius-md);
padding: var(--space-5);
background: var(--surface-1);
margin-block: var(--space-4);
}
} /* end @layer data-attrs */
/**
* 05-utilities.css
* Utility patterns (layout helpers, text modifiers, responsive utilities)
* Part of: Agentic Semantic Web
*/
@layer utilities {
/* ══════════════════════════════════════════════════════════════════════════
Text utilities
══════════════════════════════════════════════════════════════════════════ */
[data-text~="mono"] {
font-family: var(--font-mono);
}
[data-text~="dim"] {
color: var(--text-3);
}
[data-text~="accent"] {
color: var(--accent);
}
[data-text~="small"] {
font-size: var(--text-xs);
}
/* Eyebrow — small monospace uppercase accent label above a heading */
[data-text~="eyebrow"] {
display: block;
font-family: var(--font-mono);
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--accent);
margin-bottom: var(--space-2);
}
/* ══════════════════════════════════════════════════════════════════════════
Layout utilities
══════════════════════════════════════════════════════════════════════════ */
/* Max-width content column — constrains fluid sections to readable width */
[data-wrap] {
max-width: var(--width-content);
margin-inline: auto;
padding-inline: var(--space-5);
}
/* Inline definition lists */
dl[data-layout="inline"] {
display: grid;
grid-template-columns: auto 1fr;
gap: 0.15rem 1rem;
align-items: baseline;
}
dl[data-layout="inline"] dt,
dl[data-layout="inline"] dd {
margin: 0;
padding: 0;
margin-inline-start: 0;
}
/* ══════════════════════════════════════════════════════════════════════════
Responsive visibility
══════════════════════════════════════════════════════════════════════════ */
/* Hide on mobile */
[data-visible="desktop"] {
display: none;
}
@media (--md-n-above) {
[data-visible="desktop"] {
display: initial;
}
}
/* Hide on desktop */
[data-visible="mobile"] {
display: initial;
}
@media (--md-n-above) {
[data-visible="mobile"] {
display: none;
}
}
/* ══════════════════════════════════════════════════════════════════════════
Loading indicator — aria-busy
Usage:
══════════════════════════════════════════════════════════════════════════ */
@keyframes spin {
to { transform: rotate(360deg); }
}
[aria-busy="true"] {
cursor: progress;
}
/* Inline spinner before text in buttons and interactive elements */
:is(button, [role="button"], a)[aria-busy="true"]::before {
content: "";
display: inline-block;
width: 1em;
height: 1em;
margin-right: 0.5em;
vertical-align: -0.125em;
border: var(--focus-ring-width) solid currentColor;
border-top-color: transparent;
border-radius: 50%;
}
/* Disable interaction on busy buttons */
:is(button, [role="button"])[aria-busy="true"] {
pointer-events: none;
opacity: 0.7;
}
/* Block-level busy: overlay spinner centered */
:is(section, article, main, div)[aria-busy="true"] {
position: relative;
min-height: 3rem;
}
:is(section, article, main, div)[aria-busy="true"]::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 1.5rem;
height: 1.5rem;
margin: -0.75rem 0 0 -0.75rem;
border: var(--outline-width) solid var(--text-3);
border-top-color: transparent;
border-radius: 50%;
}
/* Spinner rotation — guarded: skip for users who prefer reduced motion */
@media (--motionOK) {
:is(button, [role="button"], a)[aria-busy="true"]::before {
animation: spin var(--spinner-duration) linear infinite;
}
:is(section, article, main, div)[aria-busy="true"]::after {
animation: spin var(--spinner-duration) linear infinite;
}
}
/* ══════════════════════════════════════════════════════════════════════════
Accessibility enhancements
══════════════════════════════════════════════════════════════════════════ */
/* Disable all transitions and animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* Increase contrast for high-contrast preference */
@media (prefers-contrast: more) {
:root {
--border-color: var(--hc-border);
--border-color-subtle: var(--border-subtle);
--text-primary: var(--hc-text);
--text-secondary: var(--text-2);
--border-width: var(--focus-ring-width);
}
/* Thicker borders on interactive elements */
a,
button,
input,
select,
textarea,
[data-wikilink] {
border-width: var(--focus-ring-width);
}
/* Stronger focus indicators */
:focus-visible {
outline-width: var(--border-width-thick);
outline-offset: var(--border-width-thick);
}
}
} /* end @layer utilities */
/**
* 06-charts.css
* Data-driven charts from semantic HTML tables.
* Absorbed from Charts.css — class API converted to data-attributes.
*
* Core vocabulary:
* data-chart="bar|column|line|area|pie" — chart type
* data-chart-labels — show axis labels (thead)
* data-chart-spacing="1–5" — gap between bars (default 2)
* data-chart-stacked — stacked multi-dataset mode
* style="--size: 0.8" — data injection on (legal exception)
* style="--color: #hex" — per-row color override on |
*
* Pragmatic exception: style="--size: N" and style="--color: X" on table cells
* are DATA injection, not presentation — they bind numeric values to CSS.
* This is the one place ASW permits inline style attributes.
*
* Chart dimensions:
* --chart-height Bar chart: bar thickness. Column chart: chart height.
* --chart-bar-size Column chart: bar width.
* --chart-gap Gap between data points.
*
* Lineage: Charts.css (MIT) — converted class API to data-attribute API.
* Reference: chartscss.org
*/
@layer charts {
/* ══════════════════════════════════════════════════════════════════════════
Shared chart tokens
══════════════════════════════════════════════════════════════════════════ */
[data-chart] {
/* Data series colors — cycle via nth-child in each chart type */
--chart-color-1: var(--accent); /* green */
--chart-color-2: var(--accent-blue); /* blue */
--chart-color-3: var(--accent-orange); /* orange */
--chart-color-4: var(--accent-red); /* red */
--chart-color-5: var(--purple-5, #ae3ec9);
--chart-color-6: var(--cyan-5, #15aabf);
--chart-color-7: var(--pink-5, #e64980);
--chart-color-8: var(--teal-5, #0ca678);
/* Layout */
--chart-height: 200px; /* column chart area height */
--chart-bar-size: var(--space-6); /* column bar width / bar chart bar height */
--chart-gap: 6px; /* spacing between data points */
/* Axis / labels */
--chart-axis: var(--border);
--chart-axis-width: var(--outline-width);
--chart-label: var(--text-3);
--chart-label-size: var(--text-xs);
/* Bar styling */
--chart-radius: var(--radius-2);
/* Reset table styles — is presentational structure here */
display: block;
inline-size: 100%;
border-collapse: collapse;
border-spacing: 0;
background: transparent;
}
[data-chart] caption {
display: block;
font-size: var(--text-sm);
color: var(--text-3);
text-align: start;
padding-block-end: var(--space-4);
caption-side: top;
}
/* thead: hidden by default, shown with data-chart-labels */
[data-chart] thead {
display: none;
}
[data-chart][data-chart-labels] thead {
display: block;
}
/* tbody: each chart type overrides this */
[data-chart] tbody {
display: block;
}
/* ══════════════════════════════════════════════════════════════════════════
Bar chart — horizontal bars
══════════════════════════════════════════════════════════════════════════
Structure:
The bar width = 100% × --size. Bar is a ::before pseudo on td.
══════════════════════════════════════════════════════════════════════════ */
[data-chart="bar"] tbody {
display: flex;
flex-direction: column;
gap: var(--chart-gap);
/* Left axis line */
border-inline-start: var(--chart-axis-width) solid var(--chart-axis);
padding-inline-start: 0;
}
[data-chart="bar"] tr {
display: flex;
align-items: center;
gap: var(--space-4);
}
/* Row label (th) */
[data-chart="bar"] th[scope="row"] {
font-size: var(--chart-label-size);
font-weight: 400;
color: var(--chart-label);
min-inline-size: 5rem;
max-inline-size: 8rem;
text-align: end;
padding-block: 0;
padding-inline: var(--space-2) 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-shrink: 0;
}
/* Data cell — the track */
[data-chart="bar"] td {
flex: 1;
position: relative;
block-size: var(--chart-bar-size);
display: flex;
align-items: center;
padding: 0;
overflow: visible;
}
/* The bar itself — ::before */
[data-chart="bar"] td::before {
content: "";
display: block;
block-size: 100%;
inline-size: calc(100% * var(--size, 0.5));
background: var(--color, var(--chart-color-1));
border-radius: 0 var(--chart-radius) var(--chart-radius) 0;
transition: opacity var(--ease), inline-size var(--duration-moderate-1) var(--ease-3, ease-out);
}
[data-chart="bar"] td:hover::before {
opacity: 0.8;
}
/* Data label (text inside/after bar) */
[data-chart="bar"] td::after {
content: attr(data-value);
position: absolute;
inset-inline-start: calc(100% * var(--size, 0.5) + 0.35rem);
font-size: var(--chart-label-size);
color: var(--text-3);
white-space: nowrap;
}
/* Color cycling for multi-series */
[data-chart="bar"] tr:nth-child(1) td::before { background: var(--color, var(--chart-color-1)); }
[data-chart="bar"] tr:nth-child(2) td::before { background: var(--color, var(--chart-color-2)); }
[data-chart="bar"] tr:nth-child(3) td::before { background: var(--color, var(--chart-color-3)); }
[data-chart="bar"] tr:nth-child(4) td::before { background: var(--color, var(--chart-color-4)); }
[data-chart="bar"] tr:nth-child(5) td::before { background: var(--color, var(--chart-color-5)); }
[data-chart="bar"] tr:nth-child(6) td::before { background: var(--color, var(--chart-color-6)); }
[data-chart="bar"] tr:nth-child(7) td::before { background: var(--color, var(--chart-color-7)); }
[data-chart="bar"] tr:nth-child(8) td::before { background: var(--color, var(--chart-color-8)); }
[data-chart="bar"] tr:nth-child(n+9) td::before { background: var(--color, var(--chart-color-1)); }
/* ── Spacing modifiers ──────────────────────────────────── */
[data-chart="bar"][data-chart-spacing="1"] tbody { gap: 2px; }
[data-chart="bar"][data-chart-spacing="2"] tbody { gap: 6px; }
[data-chart="bar"][data-chart-spacing="3"] tbody { gap: 10px; }
[data-chart="bar"][data-chart-spacing="4"] tbody { gap: 16px; }
[data-chart="bar"][data-chart-spacing="5"] tbody { gap: 24px; }
/* ══════════════════════════════════════════════════════════════════════════
Column chart — vertical bars
══════════════════════════════════════════════════════════════════════════
Structure:
The chart area is --chart-height. Each column height = --chart-height × --size.
Columns sit at the bottom of the chart area (flex-end alignment).
══════════════════════════════════════════════════════════════════════════ */
[data-chart="column"] tbody {
display: flex;
flex-direction: row;
align-items: flex-end;
gap: var(--chart-gap);
block-size: var(--chart-height);
border-block-end: var(--chart-axis-width) solid var(--chart-axis);
padding: 0;
}
[data-chart="column"] tr {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
flex: 1;
block-size: 100%;
gap: var(--space-1);
}
/* Column label (th) at the bottom */
[data-chart="column"] th[scope="row"] {
font-size: var(--chart-label-size);
font-weight: 400;
color: var(--chart-label);
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-inline-size: 100%;
padding: 0;
padding-block-start: var(--space-1);
/* Move below axis */
order: 2;
margin-block-start: var(--space-2);
}
/* Data cell — the column bar */
[data-chart="column"] td {
display: block;
inline-size: 100%;
block-size: calc(var(--chart-height) * var(--size, 0.5));
padding: 0;
order: 1;
transition: block-size var(--duration-moderate-1) var(--ease-3, ease-out);
border-radius: var(--chart-radius) var(--chart-radius) 0 0;
}
/* Color cycling for columns */
[data-chart="column"] tr:nth-child(1) td { background: var(--color, var(--chart-color-1)); }
[data-chart="column"] tr:nth-child(2) td { background: var(--color, var(--chart-color-2)); }
[data-chart="column"] tr:nth-child(3) td { background: var(--color, var(--chart-color-3)); }
[data-chart="column"] tr:nth-child(4) td { background: var(--color, var(--chart-color-4)); }
[data-chart="column"] tr:nth-child(5) td { background: var(--color, var(--chart-color-5)); }
[data-chart="column"] tr:nth-child(6) td { background: var(--color, var(--chart-color-6)); }
[data-chart="column"] tr:nth-child(7) td { background: var(--color, var(--chart-color-7)); }
[data-chart="column"] tr:nth-child(8) td { background: var(--color, var(--chart-color-8)); }
[data-chart="column"] tr:nth-child(n+9) td { background: var(--color, var(--chart-color-1)); }
[data-chart="column"] td:hover {
opacity: 0.8;
}
/* ── Spacing modifiers ──────────────────────────────────── */
[data-chart="column"][data-chart-spacing="1"] tbody { gap: 2px; }
[data-chart="column"][data-chart-spacing="2"] tbody { gap: 6px; }
[data-chart="column"][data-chart-spacing="3"] tbody { gap: 12px; }
[data-chart="column"][data-chart-spacing="4"] tbody { gap: 20px; }
[data-chart="column"][data-chart-spacing="5"] tbody { gap: 32px; }
/* ── Column chart labels ───────────────────────────────── */
/* When data-chart-labels present, show thead as axis header */
[data-chart="column"][data-chart-labels] thead {
display: flex;
justify-content: space-around;
margin-block-end: var(--space-2);
}
[data-chart="column"][data-chart-labels] thead th {
font-size: var(--chart-label-size);
color: var(--chart-label);
font-weight: 400;
text-align: center;
flex: 1;
}
/* ══════════════════════════════════════════════════════════════════════════
Area chart — filled area from baseline
══════════════════════════════════════════════════════════════════════════
CSS-only area charts use linear-gradient on the td background.
Each point's area = --size fraction of the column height.
Structure identical to column — but cells connect visually.
The visual connection requires identical widths and no gap (or clip).
══════════════════════════════════════════════════════════════════════════ */
[data-chart="area"] tbody {
display: flex;
flex-direction: row;
align-items: flex-end;
block-size: var(--chart-height);
border-block-end: var(--chart-axis-width) solid var(--chart-axis);
gap: 0; /* no gap — cells must connect */
padding: 0;
}
[data-chart="area"] tr {
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: flex-end;
flex: 1;
block-size: 100%;
}
[data-chart="area"] th[scope="row"] {
font-size: var(--chart-label-size);
font-weight: 400;
color: var(--chart-label);
text-align: center;
order: 2;
padding-block-start: var(--space-1);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Area cell — filled gradient from --size down to baseline */
[data-chart="area"] td {
display: block;
inline-size: 100%;
block-size: calc(var(--chart-height) * var(--size, 0.5));
padding: 0;
order: 1;
background: linear-gradient(
to bottom,
var(--chart-color-1) 0%,
color-mix(in oklch, var(--chart-color-1), transparent 70%) 100%
);
}
/* ══════════════════════════════════════════════════════════════════════════
Line chart — dots connected by a visual line
══════════════════════════════════════════════════════════════════════════
CSS-only: we use the column approach but mark the top with a dot (::after)
and use a border-top line to simulate connection between points.
True line interpolation requires JavaScript or SVG.
What we ship: column bars in outline/transparent mode with an accent dot
at the top — semantic, readable, no JS.
══════════════════════════════════════════════════════════════════════════ */
[data-chart="line"] tbody {
display: flex;
flex-direction: row;
align-items: flex-end;
block-size: var(--chart-height);
border-block-end: var(--chart-axis-width) solid var(--chart-axis);
gap: 0;
padding: 0;
position: relative;
}
[data-chart="line"] tr {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
flex: 1;
block-size: 100%;
}
[data-chart="line"] th[scope="row"] {
font-size: var(--chart-label-size);
font-weight: 400;
color: var(--chart-label);
text-align: center;
order: 2;
padding-block-start: var(--space-1);
white-space: nowrap;
}
/* Line chart cell — transparent bar with accent top border + dot */
[data-chart="line"] td {
display: block;
inline-size: 100%;
block-size: calc(var(--chart-height) * var(--size, 0.5));
padding: 0;
order: 1;
background: linear-gradient(
to bottom,
color-mix(in oklch, var(--chart-color-1), transparent 80%) 0%,
transparent 60%
);
border-block-start: var(--outline-width) solid var(--chart-color-1);
position: relative;
}
/* Dot at data point */
[data-chart="line"] td::before {
content: "";
display: block;
position: absolute;
inset-block-start: -5px;
inset-inline-start: 50%;
translate: -50% 0;
inline-size: 8px;
block-size: 8px;
border-radius: 50%;
background: var(--chart-color-1);
border: var(--outline-width) solid var(--surface);
z-index: 1;
}
/* ══════════════════════════════════════════════════════════════════════════
Pie chart — conic-gradient segments
══════════════════════════════════════════════════════════════════════════
CSS-only pie charts use conic-gradient on a single element.
Each segment's arc = --size × 360deg.
Requires stacking values in CSS — not practical to automate per-row.
For agent use: pie charts work best with explicit conic-gradient
set as a custom property. The data-chart="pie" wrapper provides
the shape and size; the agent sets --pie-segments.
══════════════════════════════════════════════════════════════════════════ */
[data-chart="pie"] {
--pie-size: min(200px, 100%);
--pie-segments: conic-gradient(
var(--chart-color-1) 0% 25%,
var(--chart-color-2) 25% 50%,
var(--chart-color-3) 50% 75%,
var(--chart-color-4) 75% 100%
);
}
/* Pie uses a generated element — hide table structure visually */
[data-chart="pie"] tbody { display: none; }
/* Show caption + legend from thead */
[data-chart="pie"] thead {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
justify-content: center;
margin-block-end: var(--space-4);
}
[data-chart="pie"] thead th {
font-size: var(--chart-label-size);
color: var(--chart-label);
font-weight: 400;
}
/* The pie rendered as ::before on the table element */
[data-chart="pie"]::before {
content: "";
display: block;
inline-size: var(--pie-size);
block-size: var(--pie-size);
border-radius: 50%;
background: var(--pie-segments);
margin-inline: auto;
}
/* ══════════════════════════════════════════════════════════════════════════
Stacked bars — data-chart-stacked modifier
══════════════════════════════════════════════════════════════════════════
When multiple | in one | , stack them.
══════════════════════════════════════════════════════════════════════════ */
[data-chart="bar"][data-chart-stacked] td {
/* Multiple tds per row — share the bar track inline */
display: inline-block;
inline-size: calc(100% * var(--size, 0.2));
border-radius: 0;
}
[data-chart="bar"][data-chart-stacked] td::before {
display: none; /* td IS the bar in stacked mode */
}
[data-chart="bar"][data-chart-stacked] td:first-of-type {
border-radius: 0 0 0 0;
}
[data-chart="bar"][data-chart-stacked] td:last-of-type {
border-radius: 0 var(--chart-radius) var(--chart-radius) 0;
}
/* Stacked color cycling */
[data-chart][data-chart-stacked] td:nth-of-type(1) { background: var(--chart-color-1); }
[data-chart][data-chart-stacked] td:nth-of-type(2) { background: var(--chart-color-2); }
[data-chart][data-chart-stacked] td:nth-of-type(3) { background: var(--chart-color-3); }
[data-chart][data-chart-stacked] td:nth-of-type(4) { background: var(--chart-color-4); }
/* ══════════════════════════════════════════════════════════════════════════
Accessibility
══════════════════════════════════════════════════════════════════════════ */
/* Ensure cell content (the data value) is readable for screen readers
but visually hidden inside the bar — text is in aria / caption */
[data-chart="bar"] td,
[data-chart="column"] td {
font-size: var(--chart-label-size);
color: transparent; /* data visible to SR, hidden visually */
}
/* Respect user preference — no transitions */
@media (prefers-reduced-motion: reduce) {
[data-chart] td,
[data-chart] td::before {
transition: none;
}
}
/* ══════════════════════════════════════════════════════════════════════════
Radial chart — circular gauge
══════════════════════════════════════════════════════════════════════════
Structure:
The gauge is a conic-gradient on the td element.
--size (0–1) drives the arc: --size × 360deg = colored portion.
::before pseudo creates a donut hole cutout over the gradient.
inside td floats the value text above the donut via z-index.
══════════════════════════════════════════════════════════════════════════ */
[data-chart="radial"] {
display: inline-flex;
flex-direction: column;
align-items: center;
gap: var(--space-2);
}
[data-chart="radial"] caption {
font-size: var(--chart-label-size);
color: var(--chart-label);
text-align: center;
caption-side: bottom;
padding-block-start: var(--space-2);
}
[data-chart="radial"] tbody { display: flex; }
[data-chart="radial"] tr { display: flex; }
/* The gauge circle */
[data-chart="radial"] td {
position: relative;
width: var(--chart-radial-size);
height: var(--chart-radial-size);
border-radius: 50%;
background: conic-gradient(
var(--color, var(--chart-color-1)) 0deg calc(var(--size, 0.5) * 360deg),
var(--surface-1, var(--surface)) 0deg
);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
border: none;
color: transparent; /* data readable by SR, hidden visually */
}
/* Donut hole */
[data-chart="radial"] td::before {
content: "";
position: absolute;
inset: var(--chart-radial-inset);
border-radius: 50%;
background: var(--surface);
z-index: 0;
}
/* Value text centered in the donut hole */
[data-chart="radial"] td span {
position: relative;
z-index: 1;
font-size: var(--text-xs);
font-family: var(--font-mono);
color: var(--text);
font-weight: 600;
}
/* Status color variants */
[data-chart="radial"][data-status="warning"] td {
background: conic-gradient(
var(--accent-orange, #f08c00) 0deg calc(var(--size, 0.5) * 360deg),
var(--surface-1, #111111) 0deg
);
}
[data-chart="radial"][data-status="danger"] td {
background: conic-gradient(
var(--accent-red, #e03131) 0deg calc(var(--size, 0.5) * 360deg),
var(--surface-1, #111111) 0deg
);
}
/* ══════════════════════════════════════════════════════════════════════════
Burndown chart — sprint burndown with CSS ideal-line overlay
══════════════════════════════════════════════════════════════════════════
Structure: same as column chart, but:
- Bars use --accent-red (remaining work = red)
- tbody::after renders a diagonal linear-gradient as the ideal-line
- Ideal line runs top-left to bottom-right: full work at start → zero at end
══════════════════════════════════════════════════════════════════════════ */
[data-chart="burndown"] tbody {
display: flex;
flex-direction: row;
align-items: flex-end;
block-size: var(--chart-height);
border-block-end: var(--chart-axis-width) solid var(--chart-axis);
position: relative; /* required for ::after overlay */
gap: var(--chart-gap);
padding: 0;
}
/* Ideal-line overlay — diagonal gradient = ideal burn velocity */
[data-chart="burndown"] tbody::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
to bottom right,
color-mix(in oklch, var(--chart-color-2, var(--accent-blue, #4dabf7)), transparent 20%) 0%,
transparent 100%
);
pointer-events: none;
z-index: 2;
}
[data-chart="burndown"] tr {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
flex: 1;
block-size: 100%;
gap: var(--space-1);
}
/* Remaining-work bar — red, with ideal line overlay above it */
[data-chart="burndown"] td {
display: block;
inline-size: 100%;
block-size: calc(var(--chart-height) * var(--size, 0.5));
background: color-mix(in oklch, var(--chart-color-4, var(--accent-red, #e03131)), transparent 25%);
border-radius: var(--chart-radius) var(--chart-radius) 0 0;
order: 1;
padding: 0;
border: none;
color: transparent;
position: relative;
z-index: 1;
transition: opacity var(--ease);
}
[data-chart="burndown"] td:hover { opacity: 0.85; }
[data-chart="burndown"] th[scope="row"] {
font-size: var(--chart-label-size);
font-weight: 400;
color: var(--chart-label);
text-align: center;
order: 2;
padding-block-start: var(--space-1);
white-space: nowrap;
padding: 0;
margin-block-start: var(--space-2);
}
/* ── Spacing modifiers for area and line (port from bar/column) ──── */
[data-chart="area"][data-chart-spacing="1"] tbody { gap: 0; }
[data-chart="area"][data-chart-spacing="2"] tbody { gap: 2px; }
[data-chart="area"][data-chart-spacing="3"] tbody { gap: 6px; }
[data-chart="area"][data-chart-spacing="4"] tbody { gap: 12px; }
[data-chart="area"][data-chart-spacing="5"] tbody { gap: 20px; }
[data-chart="line"][data-chart-spacing="1"] tbody { gap: 0; }
[data-chart="line"][data-chart-spacing="2"] tbody { gap: 2px; }
[data-chart="line"][data-chart-spacing="3"] tbody { gap: 6px; }
[data-chart="line"][data-chart-spacing="4"] tbody { gap: 12px; }
[data-chart="line"][data-chart-spacing="5"] tbody { gap: 20px; }
/* ── data-chart-reverse modifier ────────────────────────────────── */
[data-chart="bar"][data-chart-reverse] tbody {
flex-direction: column-reverse;
}
[data-chart="column"][data-chart-reverse] tbody {
flex-direction: row-reverse;
}
/* ── data-chart-stacked on column ───────────────────────────────── */
[data-chart="column"][data-chart-stacked] tr {
flex-direction: row;
align-items: flex-end;
gap: 0;
}
[data-chart="column"][data-chart-stacked] td {
flex: 1;
border-radius: 0;
block-size: calc(var(--chart-height) * var(--size, 0.2));
}
[data-chart="column"][data-chart-stacked] td:first-of-type {
border-radius: var(--chart-radius) 0 0 0;
}
[data-chart="column"][data-chart-stacked] td:last-of-type {
border-radius: 0 var(--chart-radius) 0 0;
}
/* ── data-chart-labels on bar ────────────────────────────────────── */
[data-chart="bar"][data-chart-labels] thead {
display: block;
margin-block-end: var(--space-2);
}
[data-chart="bar"][data-chart-labels] thead th {
font-size: var(--chart-label-size);
color: var(--chart-label);
font-weight: 400;
}
} /* end @layer charts */
/**
* 07-chroma.css
* CSS-only syntax highlighting — maps Hugo/Chroma class names to Open Props
* color tokens. Requires Hugo markup.highlight.noClasses = false.
*
* Generated class reference: hugo gen chromastyles --style=monokai
* Token palette: Open Props perceptual color scale.
* Part of: Agentic Semantic Web
*/
/* ── Wrapper ─────────────────────────────────────────────────────────── */
.chroma {
background: var(--surface-1);
border-radius: var(--radius-2);
overflow-x: auto;
}
.chroma pre {
background: var(--surface-1);
padding: var(--space-4);
border-radius: var(--radius-2);
overflow-x: auto;
margin: 0;
}
/* ── Keywords ────────────────────────────────────────────────────────── */
/* .k .kc .kd .kn .kp .kr .kt */
.chroma .k,
.chroma .kc,
.chroma .kd,
.chroma .kp,
.chroma .kr,
.chroma .kt {
color: var(--syntax-keyword);
}
/* KeywordNamespace — import/from/as */
.chroma .kn {
color: var(--syntax-keyword);
}
/* ── Strings ─────────────────────────────────────────────────────────── */
/* .s .sa .sb .sc .dl .sd .s2 .se .sh .si .sx .sr .s1 .ss */
.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s2,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .sr,
.chroma .s1,
.chroma .ss {
color: var(--syntax-string);
}
/* LiteralStringEscape — \n \t etc — slightly lighter to distinguish */
.chroma .se {
color: var(--syntax-string);
}
/* ── Comments ────────────────────────────────────────────────────────── */
/* .c .c1 .ch .cm .cp .cpf .cs */
.chroma .c,
.chroma .c1,
.chroma .ch,
.chroma .cm,
.chroma .cp,
.chroma .cpf,
.chroma .cs {
color: var(--syntax-comment);
font-style: italic;
}
/* ── Numbers ─────────────────────────────────────────────────────────── */
/* .m .mb .mf .mh .mi .mo .mx */
.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo,
.chroma .mx {
color: var(--syntax-variable);
}
/* ── Names / Functions ───────────────────────────────────────────────── */
/* .n .na .nb .nc .nd .ne .nf .ni .nl .nn .nx .py */
.chroma .na,
.chroma .nc,
.chroma .nd,
.chroma .ne,
.chroma .nf,
.chroma .nx,
.chroma .py {
color: var(--syntax-keyword);
}
/* ── Operators / Punctuation ─────────────────────────────────────────── */
/* .o .ow .p */
.chroma .o,
.chroma .ow {
color: var(--text);
}
/* ── Error ───────────────────────────────────────────────────────────── */
.chroma .err {
color: var(--syntax-deleted);
background: transparent;
}
/* ── Generic diffs / emphasis ────────────────────────────────────────── */
.chroma .gd { color: var(--syntax-deleted); }
.chroma .gi { color: var(--syntax-inserted); }
.chroma .ge { font-style: italic; }
.chroma .gs { font-weight: bold; }
/* ── Line number chrome ──────────────────────────────────────────────── */
.chroma .ln,
.chroma .lnt {
color: var(--text-3);
user-select: none;
padding-inline-end: var(--space-4);
}
/**
* 08-layout.css
* Layout patterns: container, docs layout, grid helpers
* Part of: Agentic Semantic Web
*/
/* ══════════════════════════════════════════════════════════════════════════
Flexbox primitives — data-layout attributes for layout composition
══════════════════════════════════════════════════════════════════════════ */
/* Row: horizontal flex with wrap — nav bars, action rows, inline groups */
[data-layout="row"] {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--space-4);
}
/* Column: vertical flex with standard gap */
[data-layout="col"] {
display: flex;
flex-direction: column;
gap: var(--space-4);
}
/* Stack: vertical flex with larger gap for section-level content spacing */
[data-layout="stack"] {
display: flex;
flex-direction: column;
gap: var(--space-6);
}
/* Spread: space-between — stat bars, toolbar items, distributed nav */
[data-layout="spread"] {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: var(--space-4);
}
/* Center: centred flex — hero content, empty states, modals */
[data-layout="center"] {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--space-4);
}
/* ── Responsive: collapse horizontal layouts to stacked at 640px ──── */
@media (--compact) {
[data-layout="spread"],
[data-layout="row"] {
flex-direction: column;
align-items: stretch;
}
}
/* ── Container ─────────────────────────────────────────────────────── */
.container {
max-width: var(--width-content);
margin-inline: auto;
padding-inline: var(--container-padding);
}
/* ── Body landmark container ────────────────────────────────────────── */
body > nav { width: 100%; }
body > footer { width: 100%; }
/* Main: content container. Same pattern as article/section.
Hugo pack and most SSGs wrap content in . */
body > main {
width: 100%;
max-width: var(--width-lg);
margin-inline: auto;
padding-inline: var(--container-padding);
}
/* Header: wider than article — room for hero titles, eyebrows, meta. */
body > header {
width: 100%;
max-width: var(--width-lg);
margin-inline: auto;
padding-inline: var(--container-padding);
}
/* Article and section: standard content width. Reading width lives on
inner elements (p, li…) via max-inline-size — not on the container. */
body > article,
body > section {
width: 100%;
max-width: var(--width-lg);
margin-inline: auto;
padding-inline: var(--container-padding);
}
/* ── Body baseline ──────────────────────────────────────────────────── */
body {
background-color: var(--surface);
color: var(--text);
font-weight: var(--weight-normal);
line-height: var(--leading);
font-variant-emoji: text; /* render emoji as monochrome glyphs, not OS pictographs */
min-height: 100vh;
/* font-family and font-size live in 00-reset.css — do not set here */
}
/* ── Hero ──────────────────────────────────────────────────────────── */
/* Landing page hero block. Usually . */
/* Base hero — 09-landing.css overrides for full landing pages */
[data-layout="hero"] {
text-align: center;
padding: var(--space-8) var(--space-5);
border-bottom: var(--border-width) solid var(--border);
}
/* ── Install snippet ────────────────────────────────────────────────── */
/* One-liner install code pill. ...
*/
[data-layout="install"] {
display: inline-block;
background: var(--surface-1);
border: var(--border-width) solid var(--border);
border-radius: var(--radius-md);
padding: var(--space-2) var(--space-4);
font-family: var(--font-mono);
font-size: var(--text-sm);
margin: var(--space-4) 0;
}
/* ── Actions row ────────────────────────────────────────────────────── */
/* CTA button row.