/** * tokens.css — Native CSS token system * Replaces @import "open-props/open-props.min.css" for ASW v0.1 * * Everything in this file is hand-authored, native CSS. * No external dependencies. ~4KB gzipped. * * Values derived from OpenProps (MIT license), rounded to native oklch. * v0.1 establishes a new visual baseline — minor perceptual differences * from OpenProps are accepted and documented in CHANGELOG. */ /* ════════════════════════════════════════════════════════════════════════════ CUSTOM MEDIA QUERIES — replaced open-props/media.min.css ════════════════════════════════════════════════════════════════════════════ */ @custom-media --sm-n-above (width >= 576px); @custom-media --md-n-above (width >= 768px); @custom-media --md-n-below (width < 768px); @custom-media --lg-n-above (width >= 992px); @custom-media --xl-n-above (width >= 1200px); @custom-media --xxl-n-above (width >= 1400px); @custom-media --motionOK (prefers-reduced-motion: no-preference); /* Project-specific custom media */ @custom-media --docs-toc-hidden (width < 1100px); @custom-media --nav-compact (width < 991px); @custom-media --compact (width < 640px); /* ════════════════════════════════════════════════════════════════════════════ ANIMATIONS — replaced open-props @keyframes ════════════════════════════════════════════════════════════════════════════ */ @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes asw-spin { to { transform: rotate(360deg); } } /* ════════════════════════════════════════════════════════════════════════════ :ROOT TOKENS ════════════════════════════════════════════════════════════════════════════ */ :root { /* ══════════════════════════════════════════════════════════════════════════ FONT STACKS — replaced open-props font families ══════════════════════════════════════════════════════════════════════════ */ --font-neo-grotesque: 'Inter', 'Roboto', 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', sans-serif; --font-monospace-code: 'Dank Mono', 'Operator Mono', 'Inconsolata', 'Fira Code', 'JetBrains Mono', 'Menlo', 'Monaco', 'Cascadia Code', 'SF Mono', monospace; --font-mono: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace; /* ══════════════════════════════════════════════════════════════════════════ FONT SIZES — replaced open-props font-size scale ══════════════════════════════════════════════════════════════════════════ */ --font-size-0: 0.75rem; /* 12px @ 16px base */ --font-size-1: 1rem; /* 16px */ --font-size-4: 1.5rem; /* 24px */ --font-size-5: 2rem; /* 32px */ /* ══════════════════════════════════════════════════════════════════════════ FONT WEIGHTS — replaced open-props font-weight scale ══════════════════════════════════════════════════════════════════════════ */ --font-weight-2: 200; /* light */ --font-weight-4: 400; /* normal */ --font-weight-5: 500; /* medium */ --font-weight-6: 600; /* semibold */ --font-weight-7: 700; /* bold */ /* ══════════════════════════════════════════════════════════════════════════ LINE HEIGHTS — replaced open-props font-lineheight scale ══════════════════════════════════════════════════════════════════════════ */ --font-lineheight-1: 1.25; /* ══════════════════════════════════════════════════════════════════════════ SIZE SCALE — replaced open-props size-* tokens Used for spacing, dimensions, and component sizing. ══════════════════════════════════════════════════════════════════════════ */ --size-1: 0.25rem; /* 4px */ --size-2: 0.5rem; /* 8px */ --size-3: 1rem; /* 16px */ --size-5: 1.5rem; /* 24px */ --size-7: 2rem; /* 32px */ --size-9: 4rem; /* 64px */ --size-12: 10rem; /* 160px */ /* Pixel-precise sizes for component dimensions */ --size-px-11: 120px; /* chart radial size */ --size-px-12: 160px; /* dropdown min-width */ --size-px-14: 320px; /* tooltip max-width */ /* ══════════════════════════════════════════════════════════════════════════ BORDER SIZES — replaced open-props border-size scale ══════════════════════════════════════════════════════════════════════════ */ --border-size-2: 2px; --border-size-3: 4px; /* ══════════════════════════════════════════════════════════════════════════ BORDER RADIUS — replaced open-props radius-* tokens ══════════════════════════════════════════════════════════════════════════ */ --radius-1: 2px; --radius-2: 5px; /* ══════════════════════════════════════════════════════════════════════════ SHADOWS — replaced open-props shadow-* tokens ══════════════════════════════════════════════════════════════════════════ */ --shadow-2: 0 1px 2px -1px rgba(0,0,0,0.20), 0 2px 4px rgba(0,0,0,0.06), 0 1px 8px rgba(0,0,0,0.04); --shadow-4: 0 8px 12px -4px rgba(0,0,0,0.20), 0 12px 24px rgba(0,0,0,0.12), 0 4px 6px rgba(0,0,0,0.04); /* ══════════════════════════════════════════════════════════════════════════ EASING CURVES — replaced open-props ease-* tokens ══════════════════════════════════════════════════════════════════════════ */ --ease-1: cubic-bezier(0.25, 0.1, 0.25, 1.0); /* ease-in-out standard */ --ease-2: cubic-bezier(0.33, 1.0, 0.68, 1.0); /* ease-out decel */ --ease-3: cubic-bezier(0.25, 1.0, 0.50, 1.0); /* ease-out soft */ /* ══════════════════════════════════════════════════════════════════════════ DURATIONS — replaced open-props duration-* tokens ══════════════════════════════════════════════════════════════════════════ */ --duration-quick-1: 80ms; --duration-quick-2: 150ms; --duration-moderate-1: 180ms; --duration-gentle-1: 320ms; --duration-gentle-2: 500ms; /* ══════════════════════════════════════════════════════════════════════════ Z-INDEX LAYERS — replaced open-props layer-* tokens ══════════════════════════════════════════════════════════════════════════ */ --layer-4: 40; /* ══════════════════════════════════════════════════════════════════════════ COLOR SCALE (oklch, hue = var(--palette-hue)) Replaces open-props --color-* perceptual scale for light mode. ══════════════════════════════════════════════════════════════════════════ */ --color-1: oklch(98% 0.005 250); /* near-white */ --color-2: oklch(97% 0.007 250); /* white */ --color-3: oklch(93% 0.010 250); /* off-white */ --color-4: oklch(84% 0.015 250); /* light */ --color-8: oklch(58% 0.030 250); /* mid-grey */ --color-9: oklch(53% 0.040 250); /* grey */ --color-10: oklch(49% 0.040 250); /* grey-charcoal */ --color-11: oklch(42% 0.040 250); /* charcoal */ --color-12: oklch(35% 0.040 250); /* dark */ --color-13: oklch(28% 0.040 250); /* darker */ --color-14: oklch(20% 0.030 250); /* near-black */ --color-15: oklch(15% 0.030 250); /* black */ --color-16: oklch(10% 0.030 250); /* deep black */ /* ══════════════════════════════════════════════════════════════════════════ NAMED HUED COLORS — replaced open-props orange/teal/cyan/purple/pink Used in syntax highlighting (02-typography.css) and chart fallbacks. ══════════════════════════════════════════════════════════════════════════ */ --orange-4: oklch(75% 0.18 50); /* orange mid */ --orange-5: oklch(68% 0.18 50); /* orange deep */ --orange-7: oklch(55% 0.18 50); /* orange darker (light mode) */ --orange-8: oklch(50% 0.18 50); /* orange darkest (light mode) */ --teal-4: oklch(75% 0.15 185); --teal-5: oklch(68% 0.15 185); --teal-8: oklch(50% 0.15 185); /* teal dark (light mode) */ --cyan-4: oklch(72% 0.15 210); --cyan-5: oklch(65% 0.15 210); --cyan-9: oklch(45% 0.15 210); /* cyan dark (light mode) */ --purple-5: oklch(60% 0.15 300); --pink-5: oklch(60% 0.15 350); /* ══════════════════════════════════════════════════════════════════════════ PALETTE CONTROLS ══════════════════════════════════════════════════════════════════════════ */ --palette-hue: 250; /* blue-violet default */ --palette-chroma: 0.15; /* ══════════════════════════════════════════════════════════════════════════ SURFACES — oklch for fine-grained dark steps ══════════════════════════════════════════════════════════════════════════ */ --surface: oklch(12% 0.02 var(--palette-hue)); --surface-1: oklch(15% 0.02 var(--palette-hue)); --surface-2: oklch(18% 0.02 var(--palette-hue)); --surface-3: oklch(21% 0.02 var(--palette-hue)); --surface-card: var(--surface-1); --surface-hover: oklch(22% 0.03 var(--palette-hue)); /* ══════════════════════════════════════════════════════════════════════════ TEXT ══════════════════════════════════════════════════════════════════════════ */ --text: oklch(92% 0.02 var(--palette-hue)); --text-2: oklch(78% 0.03 var(--palette-hue)); --text-3: oklch(62% 0.03 var(--palette-hue)); --text-dim: oklch(48% 0.03 var(--palette-hue)); /* ══════════════════════════════════════════════════════════════════════════ ACCENT — peak chroma, palette-driven ══════════════════════════════════════════════════════════════════════════ */ --accent: oklch(65% var(--palette-chroma) var(--palette-hue)); --accent-hover: oklch(72% var(--palette-chroma) var(--palette-hue)); --on-accent: oklch(5% 0.02 var(--palette-hue)); --accent-focus: oklch(65% var(--palette-chroma) var(--palette-hue) / 0.35); --accent-subtle: oklch(65% var(--palette-chroma) var(--palette-hue) / 0.10); /* ══════════════════════════════════════════════════════════════════════════ LINKS — fixed blue hue ══════════════════════════════════════════════════════════════════════════ */ --link: oklch(65% 0.15 250); --link-hover: oklch(72% 0.15 250); --link-underline: oklch(65% 0.08 250); --link-hover-underline: oklch(72% 0.10 250); --link-focus: oklch(65% 0.06 250); /* ══════════════════════════════════════════════════════════════════════════ SECONDARY ACCENTS ══════════════════════════════════════════════════════════════════════════ */ --accent-blue: oklch(65% 0.15 250); --accent-red: oklch(65% 0.18 25); --accent-orange: oklch(75% 0.15 80); /* ══════════════════════════════════════════════════════════════════════════ BORDERS ══════════════════════════════════════════════════════════════════════════ */ --border: oklch(25% 0.03 var(--palette-hue)); --border-subtle: oklch(20% 0.02 var(--palette-hue)); --border-width: 1px; --outline-width: 2px; /* ══════════════════════════════════════════════════════════════════════════ FONT STACK ALIASES ══════════════════════════════════════════════════════════════════════════ */ --font-heading: var(--font-neo-grotesque); --font-ui: var(--font-neo-grotesque); /* ══════════════════════════════════════════════════════════════════════════ TYPOGRAPHY SCALE ══════════════════════════════════════════════════════════════════════════ */ --text-xs: var(--font-size-0); /* 0.75rem */ --text-sm: 0.875rem; /* 0.875rem */ --text-base: var(--font-size-1); /* 1rem */ --text-2xl: var(--font-size-4); /* 1.5rem */ --text-3xl: var(--font-size-5); /* 2rem */ /* ══════════════════════════════════════════════════════════════════════════ HEADING SCALE ══════════════════════════════════════════════════════════════════════════ */ --h1-size: 1.875rem; --h2-size: 1.5rem; --h3-size: 1.25rem; --h4-size: 1.0625rem; --h5-size: 0.9375rem; --h6-size: 0.8125rem; --h1-weight: var(--font-weight-4); --h2-weight: var(--font-weight-4); --h3-weight: var(--font-weight-4); --h4-weight: var(--font-weight-5); --h5-weight: var(--font-weight-6); --h6-weight: var(--font-weight-6); --h1-color: oklch(95% 0.02 var(--palette-hue)); --h2-color: oklch(90% 0.02 var(--palette-hue)); --h3-color: oklch(85% 0.03 var(--palette-hue)); --h4-color: oklch(78% 0.03 var(--palette-hue)); --h5-color: oklch(72% 0.03 var(--palette-hue)); --h6-color: oklch(65% 0.03 var(--palette-hue)); /* ══════════════════════════════════════════════════════════════════════════ SPACING ALIASES ══════════════════════════════════════════════════════════════════════════ */ --space-1: var(--size-1); /* 0.25rem */ --space-2: var(--size-2); /* 0.50rem */ --space-3: 0.75rem; /* 0.75rem */ --space-4: var(--size-3); /* 1.00rem */ --space-5: var(--size-5); /* 1.50rem */ --space-5a: 1.25rem; /* between --space-4 and --space-5 */ --space-6: var(--size-7); /* 2.00rem */ --space-8: var(--size-9); /* 4.00rem */ /* ══════════════════════════════════════════════════════════════════════════ LAYOUT TOKENS ══════════════════════════════════════════════════════════════════════════ */ --width-sm: 510px; --width-md: 700px; --width-lg: 950px; --width-xl: 1200px; --width-2xl: 1450px; --width-prose: 65ch; --width-report: 72ch; --width-content: 64rem; /* 1024px */ --container-padding: var(--space-4); --sidebar-link-max: var(--size-12); --sidebar-min: 10rem; --sidebar-max: 14rem; --toc-min: 10rem; --toc-max: 13rem; --nav-height: 60px; --docs-max-width: 1400px; --card-min-width: 280px; --tooltip-max-width: var(--size-px-14); --grid-gap: var(--space-5); /* ══════════════════════════════════════════════════════════════════════════ CHART DIMENSIONS ══════════════════════════════════════════════════════════════════════════ */ --chart-radial-size: var(--size-px-11); --chart-radial-inset: 18px; /* ══════════════════════════════════════════════════════════════════════════ DIFF VIEWER TOKENS ══════════════════════════════════════════════════════════════════════════ */ --diff-add-bg: color-mix(in oklch, var(--ok) 10%, transparent); --diff-remove-bg: color-mix(in oklch, var(--error) 10%, transparent); --diff-remove-text: oklch(88% 0.06 25); --diff-hunk-bg: color-mix(in oklch, var(--info) 7%, transparent); /* ══════════════════════════════════════════════════════════════════════════ AI-DISCLOSURE BORDER TOKENS ══════════════════════════════════════════════════════════════════════════ */ --ai-generated-border: color-mix(in oklch, var(--ok) 25%, transparent); --ai-assisted-border: color-mix(in oklch, var(--info) 20%, transparent); --ai-mixed-border: color-mix(in oklch, var(--warn) 30%, transparent); /* ══════════════════════════════════════════════════════════════════════════ RHYTHM ══════════════════════════════════════════════════════════════════════════ */ --type-space: var(--space-4); --type-space-top: var(--space-5); --leading: 1.6; --leading-tight: var(--font-lineheight-1); /* 1.25 */ /* ══════════════════════════════════════════════════════════════════════════ RADIUS ══════════════════════════════════════════════════════════════════════════ */ --radius-sm: var(--radius-1); /* 2px */ --radius-md: 4px; /* between radius-1 and radius-2 */ /* ══════════════════════════════════════════════════════════════════════════ EASING ══════════════════════════════════════════════════════════════════════════ */ --ease: var(--duration-moderate-1) var(--ease-3); --ease-fast: var(--duration-quick-1) var(--ease-2); --spinner-duration: var(--duration-gentle-1); /* ══════════════════════════════════════════════════════════════════════════ INLINE ELEMENT TOKENS ══════════════════════════════════════════════════════════════════════════ */ --selection: oklch(65% 0.08 250 / 0.30); --mark-bg: oklch(45% 0.10 80 / 0.40); --mark-color: var(--accent-orange); --kbd-bg: var(--text); --kbd-color: var(--surface); --code-color: var(--text-2); --table-stripe: oklch(8% 0.01 var(--palette-hue) / 0.50); /* ══════════════════════════════════════════════════════════════════════════ FORM TOKENS ══════════════════════════════════════════════════════════════════════════ */ --input-bg: var(--surface-1); --input-border: var(--border); --input-active-bg: var(--surface); --input-selected: color-mix(in oklch, var(--accent) 20%, transparent); --input-px: var(--space-4); --input-py: var(--space-3); --disabled-opacity: 0.5; /* ══════════════════════════════════════════════════════════════════════════ STATE COLORS ══════════════════════════════════════════════════════════════════════════ */ --ok: oklch(75% 0.15 145); --warn: oklch(75% 0.15 80); --error: oklch(75% 0.15 25); --info: oklch(75% 0.15 250); --blocked: oklch(48% 0.03 var(--palette-hue)); --error-active: oklch(65% 0.18 25); --error-focus: oklch(65% 0.06 25); /* ══════════════════════════════════════════════════════════════════════════ COMPONENT TOKENS ══════════════════════════════════════════════════════════════════════════ */ --track-bg: var(--surface-2); --modal-overlay: oklch(5% 0.01 var(--palette-hue) / 0.80); --modal-backdrop: blur(0.375rem); --accordion-active: var(--accent-hover); --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(115, 115, 115)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); /* Font weight aliases */ --weight-light: var(--font-weight-2); --weight-normal: var(--font-weight-4); --weight-medium: var(--font-weight-5); --weight-semibold: var(--font-weight-6); --weight-bold: var(--font-weight-7); /* Shadows */ --shadow-dropdown: var(--shadow-2); --shadow-modal: var(--shadow-4); /* Focus ring & border widths */ --focus-ring-width: var(--border-size-2); --border-width-thick: var(--border-size-3); /* Dropdown */ --dropdown-min-width: var(--size-px-12); /* ══════════════════════════════════════════════════════════════════════════ SYNTAX HIGHLIGHTING TOKENS ══════════════════════════════════════════════════════════════════════════ */ --syntax-comment: oklch(48% 0.03 var(--palette-hue)); --syntax-punctuation: oklch(48% 0.03 var(--palette-hue)); --syntax-string: oklch(75% 0.15 145); --syntax-keyword: oklch(72% 0.15 250); --syntax-property: oklch(65% 0.15 250); --syntax-variable: oklch(75% 0.15 80); --syntax-deleted: oklch(75% 0.15 25); --syntax-inserted: oklch(75% 0.15 145); --syntax-namespace: oklch(75% 0.15 80); --syntax-url: var(--link); /* ══════════════════════════════════════════════════════════════════════════ UTILITY TOKENS ══════════════════════════════════════════════════════════════════════════ */ --print-surface: oklch(100% 0 0); --print-text: oklch(0% 0 0); --absolute-black: oklch(0% 0 0); --hc-border: var(--color-10); --hc-text: var(--color-1); } /* ════════════════════════════════════════════════════════════════════════════ LIGHT MODE — override semantic aliases using native oklch values ════════════════════════════════════════════════════════════════════════════ */ @media (prefers-color-scheme: light) { :root { color-scheme: light; --surface: var(--color-1); --surface-1: var(--color-2); --surface-2: var(--color-3); --surface-card: var(--color-1); --surface-hover: var(--color-2); --text: var(--color-14); --text-2: var(--color-12); --text-3: var(--color-10); --text-dim: var(--color-8); --accent: var(--color-9); --accent-hover: var(--color-10); --on-accent: var(--color-1); --border: var(--color-4); --border-subtle: var(--color-3); --link: oklch(45% 0.15 250); --link-hover: oklch(38% 0.15 250); --link-underline: oklch(45% 0.08 250); --link-hover-underline: oklch(38% 0.10 250); --link-focus: oklch(45% 0.06 250); --h1-color: var(--color-16); --h2-color: var(--color-15); --h3-color: var(--color-14); --h4-color: var(--color-13); --h5-color: var(--color-12); --h6-color: var(--color-11); --ok: oklch(40% 0.15 145); --warn: oklch(40% 0.15 80); --error: oklch(40% 0.15 25); --info: oklch(40% 0.15 250); --mark-bg: oklch(92% 0.08 80); --mark-color: var(--color-15); --selection: oklch(80% 0.06 250); --syntax-comment: var(--color-8); --syntax-punctuation: var(--color-10); --syntax-string: oklch(40% 0.15 145); --syntax-keyword: oklch(38% 0.15 250); --syntax-property: oklch(45% 0.15 250); --syntax-variable: oklch(40% 0.15 80); --syntax-deleted: oklch(40% 0.15 25); --syntax-inserted: oklch(40% 0.15 145); --syntax-namespace: oklch(40% 0.15 80); --syntax-url: var(--link); } } /* ════════════════════════════════════════════════════════════════════════════ MANUAL THEME OVERRIDE — data-theme attribute on ════════════════════════════════════════════════════════════════════════════ */ :root[data-theme="light"] { color-scheme: light; --surface: var(--color-1); --surface-1: var(--color-2); --surface-2: var(--color-3); --surface-card: var(--color-1); --surface-hover: var(--color-2); --text: var(--color-14); --text-2: var(--color-12); --text-3: var(--color-10); --text-dim: var(--color-8); --accent: var(--color-9); --accent-hover: var(--color-10); --on-accent: var(--color-1); --border: var(--color-4); --border-subtle: var(--color-3); --link: oklch(45% 0.15 250); --link-hover: oklch(38% 0.15 250); --link-underline: oklch(45% 0.08 250); --link-hover-underline: oklch(38% 0.10 250); --link-focus: oklch(45% 0.06 250); --h1-color: var(--color-16); --h2-color: var(--color-15); --h3-color: var(--color-14); --h4-color: var(--color-13); --h5-color: var(--color-12); --h6-color: var(--color-11); --ok: oklch(40% 0.15 145); --warn: oklch(40% 0.15 80); --error: oklch(40% 0.15 25); --info: oklch(40% 0.15 250); --mark-bg: oklch(92% 0.08 80); --mark-color: var(--color-15); --selection: oklch(80% 0.06 250); --syntax-comment: var(--color-8); --syntax-punctuation: var(--color-10); --syntax-string: oklch(40% 0.15 145); --syntax-keyword: oklch(38% 0.15 250); --syntax-property: oklch(45% 0.15 250); --syntax-variable: oklch(40% 0.15 80); --syntax-deleted: oklch(40% 0.15 25); --syntax-inserted: oklch(40% 0.15 145); --syntax-namespace: oklch(40% 0.15 80); --syntax-url: var(--link); } :root[data-theme="dark"] { color-scheme: dark; } /* ════════════════════════════════════════════════════════════════════════════ RESPONSIVE FONT SCALING ════════════════════════════════════════════════════════════════════════════ */ @media (--lg-n-above) { html { font-size: 103%; } } @media (--xl-n-above) { html { font-size: 106%; } } @media (--xxl-n-above) { html { font-size: 109%; } } /** * 00-reset.css * CSS reset and normalization * Ported from: Pico CSS v2.1.1 */ /* Box-sizing reset */ *, *::before, *::after { box-sizing: border-box; background-repeat: no-repeat; } ::before, ::after { text-decoration: inherit; vertical-align: inherit; } /* Document */ :where(:root) { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; text-rendering: optimizeLegibility; overflow-wrap: break-word; tab-size: 4; } /* Root font-size — 100% default, responsive scaling in 01-tokens.css */ html { font-size: 100%; } /* Body */ body { width: 100%; margin: 0; padding: 0; font-size: var(--text-base); /* 1rem — inherits html responsive scaling */ font-family: var(--font-ui); background-color: var(--surface); color: var(--text); } /* Prose font — same neo-grotesque stack, consistent across all contexts */ /* article and [data-layout="prose"] inherit body font — no override needed */ /* Article as main content landmark */ article[role="main"] { display: block; } /* Nested lists */ :where(dl, ol, ul) :where(dl, ol, ul) { margin: 0; } /** * 02-semantic.css * Semantic HTML element styles * Part of: Agentic Semantic Web * * Ported from: Pico CSS v2.1.1 * License: MIT * * This layer handles typography and semantic HTML elements. * Classes are NOT supported—use semantic tags only. */ /* ── Typography: Headings ──────────────────────────────────────────── */ h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: var(--type-space); line-height: var(--leading-tight); font-family: var(--font-heading); text-wrap: balance; } h1 { font-size: var(--h1-size); color: var(--h1-color); font-weight: var(--h1-weight); } h2 { font-size: var(--h2-size); color: var(--h2-color); font-weight: var(--h2-weight); } h3 { font-size: var(--h3-size); color: var(--h3-color); font-weight: var(--h3-weight); } h4 { font-size: var(--h4-size); color: var(--h4-color); font-weight: var(--h4-weight); } h5 { font-size: var(--h5-size); color: var(--h5-color); font-weight: var(--h5-weight); text-transform: uppercase; letter-spacing: 0.05em; } h6 { font-size: var(--h6-size); color: var(--h6-color); font-weight: var(--h6-weight); text-transform: uppercase; letter-spacing: 0.06em; } /* Add spacing before headings that follow content elements */ :where(article, address, blockquote, dl, figure, form, ol, p, pre, table, ul) ~ :is(h1, h2, h3, h4, h5, h6) { margin-top: var(--type-space-top); } /* ── Typography: UI elements — structural, navigational, informational ── */ /* These override the prose body font with the humanist sans UI stack. */ nav, header, footer, label, th, caption, small, figcaption, button, input, select, textarea { font-family: var(--font-ui); } /* ── Top nav layout ──────────────────────────────────────────────────── */ /* Scoped to body > nav — sidebar and other navs are not affected. */ body > nav { display: flex; justify-content: space-between; align-items: center; overflow: visible; } body > nav ul { display: flex; align-items: center; flex-wrap: wrap; gap: 0; padding: 0; margin: 0; list-style: none; } body > nav li { display: inline-block; margin: 0; padding: var(--space-2) var(--space-3); } body > nav li a { display: inline-block; text-decoration: none; color: var(--text); padding: var(--space-2) var(--space-3); margin: calc(var(--space-2) * -1) calc(var(--space-3) * -1); border-radius: var(--radius-sm); } body > nav li a:hover { color: var(--accent); background: var(--surface-hover); } body > nav li strong, body > nav li b { color: var(--text); } @media (--md-n-below) { body > nav { flex-wrap: wrap; gap: var(--space-2); } body > nav ul { flex-wrap: wrap; gap: var(--space-1); } } /* ── Typography: Paragraphs ────────────────────────────────────────── */ p { margin-top: 0; margin-bottom: var(--type-space); color: var(--text); font-style: normal; font-weight: var(--weight-normal); } /* ── Typography: Lists ─────────────────────────────────────────────── */ address, dl, ol, ul { margin-top: 0; margin-bottom: var(--type-space); color: var(--text); font-style: normal; font-weight: var(--weight-normal); } :where(ol, ul) li { margin-bottom: calc(var(--type-space) * 0.25); } /* Nested lists: reduce spacing */ :where(dl, ol, ul) :where(dl, ol, ul) { margin-top: calc(var(--type-space) * 0.25); } ul li { list-style: square; } /* ── Typography: Blockquote ────────────────────────────────────────── */ blockquote { display: block; margin: var(--type-space) 0; padding: var(--space-4); border-right: none; border-left: var(--space-1) solid var(--border); border-inline-start: var(--space-1) solid var(--border); border-inline-end: none; } blockquote footer { margin-top: calc(var(--type-space) * 0.5); color: var(--text-3); } /* ── Typography: Horizontal Rule ───────────────────────────────────── */ hr { height: 0; margin: var(--type-space) 0; border: 0; border-top: var(--border-width) solid var(--border); color: inherit; } /* ── Typography: Inline Elements ───────────────────────────────────── */ b, strong { font-weight: bolder; } mark { padding: 0.125rem 0.25rem; background-color: var(--mark-bg); color: var(--mark-color); vertical-align: baseline; } ins { color: var(--text-2); text-decoration: none; } del { color: var(--accent-red); } abbr[title] { border-bottom: var(--border-width) dotted; text-decoration: none; cursor: help; } sub, sup { position: relative; font-size: 0.75em; line-height: 0; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } small { font-size: 0.875em; } /* ── Links ─────────────────────────────────────────────────────────── */ :where(a:not([role=button])), [role=link] { outline: none; background-color: transparent; color: var(--link); text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: 0.125em; transition: background-color var(--ease), color var(--ease), text-decoration var(--ease), box-shadow var(--ease); } :where(a:not([role=button])):is(:hover, :active, :focus), [role=link]:is(:hover, :active, :focus) { color: var(--link-hover); text-decoration-color: var(--link-hover-underline); } :where(a:not([role=button])):focus-visible, [role=link]:focus-visible { box-shadow: 0 0 0 var(--outline-width) var(--link-focus); } /* ── Text Selection ────────────────────────────────────────────────── */ ::selection { background-color: var(--selection); } /* ── Tables ────────────────────────────────────────────────────────── */ :where(table) { width: 100%; margin-top: 0; margin-bottom: var(--type-space); border-collapse: collapse; border-spacing: 0; text-indent: 0; color: var(--text); font-style: normal; font-weight: var(--weight-normal); } th, td { padding: calc(var(--space-4) / 2) var(--space-4); border-bottom: var(--border-width) solid var(--border); background-color: transparent; color: var(--text); font-weight: var(--weight-normal); text-align: left; } thead th, thead td { font-weight: 600; border-bottom-width: var(--focus-ring-width); } tfoot th, tfoot td { border-top: var(--border-width) solid var(--border); border-bottom: 0; } /* Striped tables (class-based but useful) */ [data-table="striped"] tbody tr:nth-child(odd) th, [data-table="striped"] tbody tr:nth-child(odd) td { background-color: var(--table-stripe); } /* ── Code & Preformatted Text ──────────────────────────────────────── */ pre, code, kbd, samp { font-size: 0.875em; font-family: var(--font-mono); border-radius: var(--radius-md); background: var(--surface-1); color: var(--code-color); font-weight: var(--weight-normal); line-height: initial; } /* Inline code elements */ code, kbd, samp { display: inline-block; padding: 0.375rem; } /* Code blocks */ pre { display: block; margin-top: 0; margin-bottom: var(--space-4); padding: var(--space-4); overflow-x: auto; -ms-overflow-style: scrollbar; } pre > code, pre > samp { display: block; padding: 0; background: none; font-size: inherit; font-family: inherit; line-height: var(--leading); } /* Keyboard input */ kbd { background-color: var(--kbd-bg); color: var(--kbd-color); vertical-align: baseline; } /* ── Prism.js Syntax Highlighting Theme ────────────────────────────── * * * These rules style Prism.js token classes using ASW tokens. * agentic.css provides the theme; each page loads Prism via: * * * * * * The CDN theme's colors are overridden here. ASW tokens handle dark/light. * ─────────────────────────────────────────────────────────────────── */ /* Reset Prism default background — pre already styled by ASW */ code[class*="language-"], pre[class*="language-"] { color: var(--code-color); background: none; text-shadow: none; } pre[class*="language-"] { background: var(--surface-1); } /* Token colors — dark (default) */ .token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--syntax-comment); font-style: italic; } .token.punctuation { color: var(--text-3); /* slightly muted */ } .token.tag, .token.deleted { color: var(--syntax-deleted); } .token.attr-name, .token.namespace { color: var(--syntax-namespace); } .token.string, .token.attr-value, .token.char, .token.inserted { color: var(--syntax-string); } .token.number, .token.boolean, .token.constant, .token.symbol { color: var(--orange-4); /* literals */ } .token.selector, .token.builtin { color: var(--teal-4); /* CSS selectors, builtins */ } .token.keyword, .token.atrule { color: var(--syntax-keyword); } .token.function, .token.class-name { color: var(--cyan-4); /* function/class names */ } .token.property { color: var(--syntax-property); } .token.operator, .token.entity, .token.url { color: var(--text-2); /* operators */ } .token.regex { color: var(--orange-5); /* regex literals */ } .token.important, .token.variable { color: var(--syntax-variable); font-weight: var(--weight-medium); } .token.bold { font-weight: var(--weight-bold); } .token.italic { font-style: italic; } /* Light mode overrides */ @media (prefers-color-scheme: light) { .token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--syntax-comment); } .token.punctuation { color: var(--syntax-punctuation); } .token.tag, .token.deleted { color: var(--syntax-deleted); } .token.attr-name, .token.namespace { color: var(--syntax-namespace); } .token.string, .token.attr-value, .token.char, .token.inserted { color: var(--syntax-string); } .token.number, .token.boolean, .token.constant, .token.symbol { color: var(--orange-8); } .token.selector, .token.builtin { color: var(--teal-8); } .token.keyword, .token.atrule { color: var(--syntax-keyword); } .token.function, .token.class-name { color: var(--cyan-9); } .token.property { color: var(--syntax-property); } .token.operator, .token.entity, .token.url { color: var(--syntax-url); } .token.regex { color: var(--orange-7); } .token.important, .token.variable { color: var(--syntax-variable); } } /* ── Details / Summary ─────────────────────────────────────────────── */ details { display: block; margin-bottom: var(--space-4); } details summary { line-height: 1rem; list-style-type: none; cursor: pointer; transition: color var(--ease); color: var(--accent); } /* Hide browser default marker */ details summary::-webkit-details-marker { display: none; } details summary::marker { display: none; } details summary::-moz-list-bullet { list-style-type: none; } /* CSS-drawn chevron using Unicode character ▸ (U+25B8) */ details summary::after { content: "▸"; display: inline-block; width: 1rem; height: 1rem; margin-inline-start: calc(var(--space-4, 1rem) * 0.5); float: right; font-size: var(--text-sm); line-height: 1rem; text-align: center; color: var(--text-3); transform: rotate(90deg); /* Point down when closed */ transition: transform var(--ease); } details summary:focus { outline: none; } details summary:focus-visible { outline: var(--outline-width) solid var(--accent-focus); outline-offset: calc(var(--space-4, 1rem) * 0.5); color: var(--accordion-active); } /* Open state */ details[open] > summary { margin-bottom: var(--space-4); color: var(--text-3); } details[open] > summary::after { transform: rotate(180deg); /* Point down when open */ } /* ── Dialog / Modal ────────────────────────────────────────────────── */ dialog { display: flex; z-index: 999; position: fixed; top: 0; right: 0; bottom: 0; left: 0; align-items: center; justify-content: center; width: inherit; min-width: auto; height: inherit; min-height: 100%; padding: 0; border: 0; backdrop-filter: var(--modal-backdrop); background-color: var(--modal-overlay); color: var(--text); } dialog > article { width: 100%; max-height: calc(100vh - var(--space-4) * 2); margin: var(--space-4); overflow: auto; } /* Responsive max-widths for modal content */ @media (--sm-n-above) { dialog > article { max-width: var(--width-sm); } } @media (--md-n-above) { dialog > article { max-width: var(--width-md); } } /* Modal header */ dialog > article > header > * { margin-bottom: 0; } dialog > article > header .close, dialog > article > header :is(a, button)[rel=prev] { margin: 0; margin-left: var(--space-4); padding: 0; float: right; } /* Modal footer */ dialog > article > footer { text-align: right; } dialog > article > footer button, dialog > article > footer [role=button] { margin-bottom: 0; } dialog > article > footer button:not(:first-of-type), dialog > article > footer [role=button]:not(:first-of-type) { margin-left: calc(var(--space-4) * 0.5); } /* Close button: Unicode ✕ (U+2715) instead of SVG */ dialog > article .close, dialog > article :is(a, button)[rel=prev] { display: block; width: 1.5rem; height: 1.5rem; margin-top: calc(var(--space-4) * -0.5); margin-bottom: var(--space-4); margin-left: auto; border: none; background-color: transparent; color: var(--text-3); font-size: 1.5rem; line-height: 1; text-align: center; opacity: 0.5; transition: opacity var(--ease); cursor: pointer; } dialog > article .close::before, dialog > article :is(a, button)[rel=prev]::before { content: "✕"; /* Unicode heavy multiplication X */ } dialog > article .close:is([aria-current]:not([aria-current=false]), :hover, :active, :focus), dialog > article :is(a, button)[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) { opacity: 1; } /* Hidden state */ dialog:not([open]), dialog[open=false] { display: none; } /* Body scroll lock when modal is open */ .modal-is-open { padding-right: var(--scrollbar-width, 0px); overflow: hidden; pointer-events: none; touch-action: none; } .modal-is-open dialog { pointer-events: auto; touch-action: auto; } /* Animations (only if motion is not reduced) */ @media (prefers-reduced-motion: no-preference) { :where(.modal-is-opening, .modal-is-closing) dialog, :where(.modal-is-opening, .modal-is-closing) dialog > article { animation-duration: var(--duration-moderate-1); animation-timing-function: ease-in-out; animation-fill-mode: both; } :where(.modal-is-opening, .modal-is-closing) dialog { animation-duration: var(--duration-gentle-2); animation-name: modal-overlay; } :where(.modal-is-opening, .modal-is-closing) dialog > article { animation-delay: var(--duration-moderate-1); animation-name: modal; } .modal-is-closing dialog, .modal-is-closing dialog > article { animation-delay: 0s; animation-direction: reverse; } @keyframes modal-overlay { from { backdrop-filter: none; background-color: transparent; } } @keyframes modal { from { transform: translateY(-100%); opacity: 0; } } } /* Respect reduced motion: instant show/hide */ @media (prefers-reduced-motion: reduce) { dialog, dialog > article { animation: none !important; transition: none !important; } } /* ── Figure & Figcaption ───────────────────────────────────────────── */ figure { display: block; margin: 0; margin-bottom: var(--space-4); padding: 0; } figure figcaption { padding: calc(var(--space-4) * 0.5) 0; color: var(--text-3); font-size: var(--text-sm); } /* ── Progress ──────────────────────────────────────────────────────── */ progress { -webkit-appearance: none; -moz-appearance: none; appearance: none; display: inline-block; vertical-align: baseline; width: 100%; height: 0.5rem; margin-bottom: calc(var(--space-4) * 0.5); overflow: hidden; border: 0; border-radius: var(--radius-md); background-color: var(--track-bg); color: var(--accent); } progress::-webkit-progress-bar { border-radius: var(--radius-md); background: none; } progress[value]::-webkit-progress-value { background-color: var(--accent); transition: inline-size var(--ease); } progress::-moz-progress-bar { background-color: var(--accent); } /* Indeterminate progress (animated) - respect motion preferences */ @media (prefers-reduced-motion: no-preference) { progress:indeterminate { background: var(--track-bg) linear-gradient(to right, var(--accent) 30%, var(--track-bg) 30%) top left / 150% 150% no-repeat; animation: progress-indeterminate calc(var(--duration-gentle-2) * 2) linear infinite; } progress:indeterminate[value]::-webkit-progress-value { background-color: transparent; } @keyframes progress-indeterminate { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } } @media (prefers-reduced-motion: reduce) { progress:indeterminate { background: var(--track-bg); } } /* ── Meter ─────────────────────────────────────────────────────────── */ meter { -webkit-appearance: none; -moz-appearance: none; appearance: none; display: inline-block; vertical-align: baseline; width: 100%; height: 0.5rem; margin-bottom: calc(var(--space-4) * 0.5); overflow: hidden; border: 0; border-radius: var(--radius-md); background-color: var(--track-bg); accent-color: var(--accent); /* Modern CSS: browser renders with our accent */ } /* Webkit meter styling */ meter::-webkit-meter-bar { border-radius: var(--radius-md); background-color: var(--track-bg); } meter::-webkit-meter-optimum-value { background-color: var(--accent); } meter::-webkit-meter-suboptimum-value { background-color: var(--accent-blue); } meter::-webkit-meter-even-less-good-value { background-color: var(--accent-red); /* Red-ish for bad values */ } /* Firefox meter styling */ meter::-moz-meter-bar { border-radius: var(--radius-md); background-color: var(--accent); } meter:-moz-meter-optimum::-moz-meter-bar { background-color: var(--accent); } meter:-moz-meter-sub-optimum::-moz-meter-bar { background-color: var(--accent-blue); } meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background-color: var(--accent-red); } /* Container layout rules moved to 08-layout.css */ /** * 03-landmarks.css * HTML landmark elements — structural bones of a page. * Part of: Agentic Semantic Web * * Covers: body > nav, article, aside, section, hgroup, dt/dd, body > footer */ /* ── Navigation ────────────────────────────────────────────────────────*/ /* Semantic nav: */ body > nav { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) max(var(--container-padding), calc((100% - var(--width-xl)) / 2)); margin-bottom: var(--space-6); border-bottom: var(--border-width) solid var(--border); } /* Push nav-links and buttons to the right */ body > nav [data-nav-links] { margin-inline-start: auto; } body > nav strong { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-base); letter-spacing: -0.03em; } body > nav ul { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--text-sm); } body > nav ul li { list-style: none; margin: 0; padding: 0; } body > nav ul li + li::before { content: "|"; color: var(--text-dim); margin: 0 0.75rem; } body > nav a { color: var(--text-2); text-decoration: none; transition: color var(--ease); } body > nav a:hover, body > nav a[aria-current="page"] { color: var(--text); } /* ── Theme toggle ─────────────────────────────────────────────────────*/ body > nav [data-theme-toggle] { background: none; border: none; cursor: pointer; font-size: 1.25rem; padding: var(--space-2); color: var(--text-2); transition: color var(--ease-3); line-height: 1; } body > nav [data-theme-toggle]::before { content: "☀️"; } [data-theme="light"] body > nav [data-theme-toggle]::before { content: "🌙"; } body > nav [data-theme-toggle]:hover { color: var(--text); } /* ── Hamburger toggle ─────────────────────────────────────────────────*/ body > nav [data-nav-toggle] { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; padding: var(--space-1) var(--space-2); color: var(--text-2); transition: color var(--ease-3); line-height: 1; } body > nav [data-nav-toggle]::before { content: "☰"; } body > nav [data-nav-toggle]:hover { color: var(--text); } /* ── Mobile nav ───────────────────────────────────────────────────────*/ @media (--md-n-below) { body > nav { flex-wrap: wrap; gap: var(--space-2); } body > nav > ul:first-child { order: 1; } body > nav [data-nav-toggle] { display: block; order: 2; margin-inline-start: auto; } body > nav [data-theme-toggle] { order: 3; } body > nav [data-nav-links] { order: 4; width: 100%; flex-direction: column; padding-top: var(--space-3); border-top: var(--border-width) solid var(--border); margin-top: var(--space-2); animation: fade-in var(--ease-3); } body > nav [data-nav-links] li + li::before { display: none; } body > nav [data-nav-links] a { display: block; padding: var(--space-2) 0; } body > nav [data-nav-links][data-collapsed] { display: none; } } /* ── Articles & Cards ──────────────────────────────────────────────────*/ /* Semantic article:

Title

Content
*/ /* Container query: layout adapts to article's own width, not viewport. An article in a sidebar shrinks gracefully; at full width it expands. */ article { container-type: inline-size; container-name: article; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5a); /* margin: var(--space-3) 0; */ } article > header { margin: 0 0 var(--space-2) 0; padding: 0 0 0.4rem 0; border-bottom: 1px solid var(--border-subtle); border-top: none; border-radius: 0; background-color: transparent; } article header h3 { margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); } /* Narrow container: compact card (sidebar, grid cell) */ @container article (max-width: 300px) { article > header { border-bottom: none; padding-bottom: 0; margin-bottom: 0.25rem; } article header h3 { font-size: var(--text-xs); } article > :is(p, dl, ul, ol) { font-size: var(--text-sm); } } /* Wide container: spacious layout */ @container article (min-width: 600px) { article { padding: var(--space-5) var(--space-6); } article > header { margin-bottom: var(--space-3); padding-bottom: var(--space-2); } } /* ── Definition Lists ──────────────────────────────────────────────────*/ /* Monospace data display for dt/dd pairs */ dt { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500; color: var(--text-2); margin-top: var(--space-3); } dd { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); margin-left: 0; margin-top: 0.15rem; } article dt:first-of-type { margin-top: 0; } /* ── Sections ──────────────────────────────────────────────────────────*/ article section + section, main section + section { padding-top: var(--space-5); border-top: var(--border-width) solid var(--border-subtle); } hgroup p { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-3); margin-top: var(--space-1); } /* Section intro: hgroup as centered subtitle block */ section > hgroup:first-child { text-align: center; margin-bottom: var(--space-6); } /* Card variant: navigation cards use UI font h3, not session-log monospace */ article[data-role="card"] header h3 { font-family: var(--font-ui); font-size: var(--h3-size); font-weight: var(--h3-weight); text-transform: none; letter-spacing: normal; color: var(--text); } /* ── Footer ────────────────────────────────────────────────────────────*/ body > footer { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); margin-top: var(--space-8); padding: var(--space-6) max(var(--container-padding), calc((100% - var(--width-xl)) / 2)); border-top: var(--border-width) solid var(--border); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-3); } body > footer > p { grid-column: 1 / -1; } body > footer h3 { font-size: var(--text-xs); font-weight: var(--weight-medium); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin-bottom: var(--space-2); } body > footer > header strong { font-family: var(--font-mono); font-size: var(--text-base); color: var(--text); letter-spacing: -0.03em; } body > footer > header p { color: var(--text-dim); margin-top: var(--space-1); } body > footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); } body > footer ul li { margin: 0; list-style: none; } body > footer a { color: var(--text-3); text-decoration: none; transition: color var(--ease-3); } body > footer a:hover { color: var(--accent); } body > footer > p { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--border-width) solid var(--border-subtle); text-align: center; color: var(--text-dim); } /** * 04-forms.css * Form element styling: buttons, inputs, selects, textareas, checkboxes, radios. * Part of: Agentic Semantic Web * * Ported from: Pico CSS v2.1.1 (MIT) * Modernizations: accent-color for checkbox/radio, no class-based variants */ /* ── Buttons ───────────────────────────────────────────────────────────*/ button { margin: 0; overflow: visible; font-family: inherit; text-transform: none; } button, [type=submit], [type=reset], [type=button], [role=button] { display: inline-block; padding: var(--input-py) var(--input-px); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); outline: none; background-color: var(--surface); color: var(--text); font-weight: var(--weight-normal); font-size: var(--text-base); line-height: var(--leading); text-align: center; text-decoration: none; cursor: pointer; user-select: none; transition: background-color var(--ease), border-color var(--ease), color var(--ease); } button:is(:hover, :active, :focus-visible), [type=submit]:is(:hover, :active, :focus-visible), [type=reset]:is(:hover, :active, :focus-visible), [type=button]:is(:hover, :active, :focus-visible), [role=button]:is(:hover, :active, :focus-visible) { background-color: var(--surface-hover); border-color: var(--border); color: var(--text); } button:focus-visible, [type=submit]:focus-visible, [type=reset]:focus-visible, [type=button]:focus-visible, [role=button]:focus-visible { box-shadow: 0 0 0 var(--outline-width) var(--accent-focus); } button[disabled], [type=submit][disabled], [type=reset][disabled], [type=button][disabled], [role=button][disabled] { opacity: 0.5; pointer-events: none; } /* ── Form Elements ─────────────────────────────────────────────────────*/ input, optgroup, select, textarea { margin: 0; font-size: var(--text-base); line-height: var(--leading); font-family: inherit; letter-spacing: inherit; } fieldset { width: 100%; margin: 0; margin-bottom: var(--space-4); padding: 0; border: 0; } fieldset legend, label { display: block; margin-bottom: calc(var(--space-4) * 0.375); color: var(--text); font-weight: var(--weight-normal); } input:not([type=checkbox], [type=radio], [type=range], [type=file]), select, textarea { width: 100%; padding: var(--input-py) var(--input-px); border: var(--border-width) solid var(--input-border); border-radius: var(--radius-md); outline: none; background-color: var(--input-bg); color: var(--text); font-weight: var(--weight-normal); transition: background-color var(--ease), border-color var(--ease), color var(--ease); } input:not([type=checkbox], [type=radio], [type=range], [type=file], [readonly]):is(:active, :focus-visible), select:not([readonly]):is(:active, :focus-visible), textarea:not([readonly]):is(:active, :focus-visible) { border-color: var(--accent); background-color: var(--input-active-bg); } input:not([type=checkbox], [type=radio], [type=range], [type=file], [readonly]):focus-visible, select:not([readonly]):focus-visible, textarea:not([readonly]):focus-visible { box-shadow: 0 0 0 var(--outline-width) var(--accent); } input:not([type=checkbox], [type=radio], [type=range], [type=file])[disabled], select[disabled], textarea[disabled] { opacity: var(--disabled-opacity); pointer-events: none; } input::placeholder, textarea::placeholder, select:invalid { color: var(--text-3); opacity: 1; } input:not([type=checkbox], [type=radio]), select, textarea { margin-bottom: var(--space-4); } /* ── Select Dropdown ───────────────────────────────────────────────────*/ select:not([multiple], [size]) { padding-right: calc(var(--input-px) + 1.5rem); background-image: var(--icon-chevron); background-position: center right 0.75rem; background-size: 1rem auto; background-repeat: no-repeat; } select[multiple] option:checked { background: var(--input-selected); color: var(--text); } /* ── Textarea ──────────────────────────────────────────────────────────*/ textarea { display: block; resize: vertical; } /* ── Checkboxes & Radios (Modern CSS) ──────────────────────────────────*/ label:has([type=checkbox], [type=radio]) { width: fit-content; cursor: pointer; } [type=checkbox], [type=radio] { width: 1.25em; height: 1.25em; margin-top: -0.125em; margin-right: 0.5em; vertical-align: middle; cursor: pointer; /* Modern CSS: use browser's native styling with our accent color */ accent-color: var(--accent); } [type=checkbox] ~ label, [type=radio] ~ label { display: inline-block; margin-bottom: 0; cursor: pointer; } [type=checkbox] ~ label:not(:last-of-type), [type=radio] ~ label:not(:last-of-type) { margin-right: 1em; } /* ── Validation States ─────────────────────────────────────────────────*/ input[aria-invalid=false], select[aria-invalid=false], textarea[aria-invalid=false] { border-color: var(--accent); } input[aria-invalid=false]:is(:active, :focus-visible), select[aria-invalid=false]:is(:active, :focus-visible), textarea[aria-invalid=false]:is(:active, :focus-visible) { border-color: var(--accent-hover); box-shadow: 0 0 0 var(--outline-width) var(--accent-focus) !important; } input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); } input[aria-invalid=true]:is(:active, :focus-visible), select[aria-invalid=true]:is(:active, :focus-visible), textarea[aria-invalid=true]:is(:active, :focus-visible) { border-color: var(--error-active); box-shadow: 0 0 0 var(--outline-width) var(--error-focus) !important; } /* ── Helper Text ───────────────────────────────────────────────────────*/ :where(input, select, textarea, fieldset) + small { display: block; width: 100%; margin-top: calc(var(--space-4) * -0.75); margin-bottom: var(--space-4); color: var(--text-3); } :where(input, select, textarea, fieldset)[aria-invalid=false] + small { color: var(--accent); } :where(input, select, textarea, fieldset)[aria-invalid=true] + small { color: var(--accent-red); } label > :where(input, select, textarea) { margin-top: calc(var(--space-4) * 0.25); } /** * 03-components.css → will become 05-components.css in Task 10 * Compound UI patterns: accordion, dialog, breadcrumb, steps. * Part of: Agentic Semantic Web * * Buttons/forms extracted to 04-forms.css * Landmarks extracted to 03-landmarks.css * Sidebar/TOC extracted to 06-navigation.css */ /* ── Accordion / Disclosure ────────────────────────────────────────────*/ /* Standalone
/ — no JS needed. Nav dropdown variant lives in 03-landmarks.css. Usage:
Title

Content

Grouped variant:
*/ details:not(nav details) { border: var(--border-width) solid var(--border); border-radius: var(--radius-md); margin-bottom: var(--space-3); background: var(--surface-1); overflow: hidden; } details:not(nav details) > summary { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); font-family: var(--font-ui); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--text); cursor: pointer; list-style: none; user-select: none; transition: background-color var(--ease), color var(--ease); } details:not(nav details) > summary::-webkit-details-marker { display: none; } /* Chevron indicator */ details:not(nav details) > summary::after { content: "▾"; font-size: var(--text-sm); color: var(--text-3); transition: transform var(--ease); flex-shrink: 0; margin-inline-start: var(--space-3); } details:not(nav details)[open] > summary::after { transform: rotate(180deg); } details:not(nav details) > summary:hover { background-color: var(--surface-hover); color: var(--text); } details:not(nav details) > summary:focus-visible { outline: var(--outline-width) solid var(--accent-focus); outline-offset: -2px; } /* Body content */ details:not(nav details) > :not(summary) { padding: var(--space-3) var(--space-4) var(--space-4); border-top: var(--border-width) solid var(--border); } details:not(nav details) > :not(summary):last-child { margin-bottom: 0; } /* Grouped accordion: flush borders between items */ [data-role="accordion"] > details:not(nav details) { margin-bottom: 0; border-radius: 0; border-bottom-width: 0; } [data-role="accordion"] > details:not(nav details):first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; } [data-role="accordion"] > details:not(nav details):last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); border-bottom-width: var(--border-width); } [data-role="accordion"] > details:not(nav details):only-child { border-radius: var(--radius-md); border-bottom-width: var(--border-width); } /* ── Dialog / Modal ────────────────────────────────────────────────────*/ /* Native element. Works with dialog.showModal() / dialog.close(). Usage:

Title

Body content.

*/ dialog { position: fixed; inset: 0; margin: auto; padding: 0; border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); box-shadow: var(--shadow-modal); z-index: var(--layer-4); max-width: min(90vw, 42rem); max-height: min(90vh, 40rem); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; } dialog:not([open]) { display: none; } /* Backdrop (modal mode only — showModal()) */ dialog::backdrop { background: var(--modal-overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); } /* Internal layout */ dialog > header { padding: var(--space-4) var(--space-5); border-bottom: var(--border-width) solid var(--border); background: transparent; border-top: none; border-radius: 0; } dialog > header h1, dialog > header h2, dialog > header h3 { margin: 0; font-size: var(--text-2xl); color: var(--text); } dialog > :not(header):not(footer) { padding: var(--space-5); } dialog > footer { padding: var(--space-3) var(--space-5); border-top: var(--border-width) solid var(--border); display: flex; justify-content: flex-end; gap: var(--space-3); background: var(--surface); border-radius: 0 0 var(--radius-md) var(--radius-md); } /* ══════════════════════════════════════════════════════════════════════════ Breadcrumb —