/* ============================================================================ */ /* Base / Reset */ /* ============================================================================ */ html { box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji; color: var(--text-color); } audio { display: block; width: 100%; } /* Avoid constraining
inside grid; scope container sizing elsewhere if needed */ /* main { max-width: 980px; margin: 24px auto; padding: 16px; } */ /* ============================================================================ */ /* Typography (inspired by Distill) */ /* ============================================================================ */ html { font-size: 14px; line-height: 1.6; } @media (min-width: 768px) { html { font-size: 16px; } } @media (min-width: 1024px) { html { font-size: 17px; } } .content-grid main { color: var(--text-color); } .content-grid main p { margin: 0 0 var(--spacing-3); } .content-grid main h2 { font-weight: 600; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; margin: var(--spacing-10) 0 var(--spacing-5); padding-bottom: var(--spacing-2); border-bottom: 1px solid var(--border-color); } .content-grid main h3 { font-weight: 700; font-size: clamp(18px, 2.1vw, 22px); line-height: 1.25; margin: var(--spacing-8) 0 var(--spacing-4); } .content-grid main h4 { font-weight: 600; text-transform: uppercase; font-size: 14px; line-height: 1.2; margin: var(--spacing-8) 0 var(--spacing-4); } .content-grid main a { color: var(--primary-color); text-decoration: none; border-bottom: 1px solid var(--link-underline); } .content-grid main a:hover { color: var(--primary-color-hover); border-bottom: 1px solid var(--link-underline-hover); } /* Do not underline heading links inside the article (not the TOC) */ .content-grid main h2 a, .content-grid main h3 a, .content-grid main h4 a { color: inherit; border-bottom: none; text-decoration: none; } .content-grid main h2 a:hover, .content-grid main h3 a:hover, .content-grid main h4 a:hover { color: inherit; border-bottom: none; text-decoration: none; } .content-grid main ul, .content-grid main ol { padding-left: 24px; margin: 0 0 var(--spacing-3); } .content-grid main li { margin-bottom: var(--spacing-2); } .content-grid main li:last-child { margin-bottom: 0; } .content-grid main blockquote { border-left: 2px solid var(--border-color); padding-left: var(--spacing-4); font-style: italic; color: var(--muted-color); margin: var(--spacing-4) 0; } .content-grid main pre:not(.astro-code) { background: var(--code-bg); border: 1px solid var(--border-color); border-radius: 6px; padding: var(--spacing-3); font-size: 14px; overflow: auto; } /* Rely on Shiki's own token spans; no class remap */ .content-grid main code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } /* Placeholder block (discreet centered text) */ .placeholder-block { display: grid; place-items: center; min-height: 120px; color: var(--muted-color); font-size: 12px; border: 1px dashed var(--border-color); border-radius: 8px; background: var(--surface-bg); } /* Demo blocks for width helpers */ .demo-wide, .demo-full-bleed { display: grid; place-items: center; min-height: 150px; color: var(--muted-color); font-size: 12px; border: 1px dashed var(--border-color); border-radius: 8px; background: var(--surface-bg); } /* Pretty-code language label (visible chip at top-right) */ .content-grid main pre:has(code[data-language]), .content-grid main pre:has(code[class*="language-"]) { position: relative; padding-top: 28px; /* space for the label */ } .content-grid main pre > code[data-language]::after, .content-grid main pre > code[class*="language-"]::after { content: attr(data-language); position: absolute; top: 4px; right: 6px; font-size: 11px; line-height: 1; text-transform: uppercase; color: var(--muted-color); background: transparent; border: none; border-radius: 4px; padding: 2px 4px; pointer-events: none; z-index: 1; } .content-grid main table { border-collapse: collapse; width: 100%; margin: 0 0 var(--spacing-4); } .content-grid main th, .content-grid main td { border-bottom: 1px solid var(--border-color); padding: 6px 8px; text-align: left; font-size: 15px; } .content-grid main thead th { border-bottom: 1px solid var(--border-color); } .content-grid main hr { border: none; border-bottom: 1px solid var(--border-color); margin: var(--spacing-5) 0; } /* .code-block { background: rgba(120, 120, 120, 0.5); border: 1px solid var(--border-color); border-radius: 6px; padding: var(--spacing-3); font-size: 14px; overflow: auto; } */ /* ============================================================================ */ /* Media / Figures */ /* ============================================================================ */ img, picture { width: 100%; max-width: 100%; height: auto; display: block; } /* Inline feature tags */ .tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; } .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 12px; line-height: 1; border-radius: 999px; background: var(--surface-bg); border: 1px solid var(--border-color); color: var(--text-color); } [data-theme="dark"] .tag { background: #1a1f27; border-color: rgba(255,255,255,.15); } /* ============================================================================ */ /* Figures, captions & image credits */ /* ============================================================================ */ figure { margin: 12px 0; } figcaption { text-align: left; font-size: 0.9rem; color: var(--muted-color); margin-top: 6px; } .image-credit { display: block; margin-top: 4px; font-size: 12px; color: var(--muted-color); } .image-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; } /* ============================================================================ */ /* Buttons (minimal, clean) */ /* ============================================================================ */ button, .button { appearance: none; background: linear-gradient(15deg, var(--primary-color) 0%, var(--primary-color-hover) 35%); color: white!important; border: 1px solid transparent; border-radius: 6px; padding: 8px 12px; font-size: 14px; line-height: 1; cursor: pointer; display: inline-block; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .02s ease; } button:hover, .button:hover { filter: brightness(96%); } button:active, .button:active { transform: translateY(1px); } button:focus-visible, .button:focus-visible { outline: none; } button:disabled, .button:disabled { opacity: .6; cursor: not-allowed; } .button-group .button { margin: 5px; } /* ============================================================================ */ /* Print styles */ /* ========================================================================= */ @media print { html, body { background: #fff; } /* Margins handled by Playwright; avoid extra global margins */ body { margin: 0; } /* Keep the banner (hero), hide non-essential UI elements */ #theme-toggle { display: none !important; } /* Links: remove underline */ .content-grid main a { text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.2); } /* Avoid breaks inside complex blocks */ .content-grid main pre, .content-grid main blockquote, .content-grid main table, .content-grid main figure { break-inside: avoid; page-break-inside: avoid; } /* Soft page breaks around main headings */ .content-grid main h2 { page-break-before: auto; page-break-after: avoid; break-after: avoid-page; } /* Small icon labels not needed when printing */ .code-lang-chip { display: none !important; } /* Adjust more contrasty colors for print */ :root { --border-color: rgba(0,0,0,.2); --link-underline: rgba(0,0,0,.3); --link-underline-hover: rgba(0,0,0,.4); } /* Force single column to reduce widows/orphans and awkward breaks */ .content-grid { grid-template-columns: 1fr !important; } .toc, .right-aside, .toc-mobile { display: none !important; } main > nav:first-of-type { display: none !important; } /* Avoid page breaks inside complex visual blocks */ .hero, .hero-banner, .d3-galaxy, .d3-galaxy svg, .plot-card, .js-plotly-plot, figure, pre, table, blockquote, .wide, .full-bleed { break-inside: avoid; page-break-inside: avoid; } /* Prefer keeping header+lead together */ .hero { page-break-after: avoid; } } .muted { color: var(--muted-color); }