File size: 8,927 Bytes
b9e7b9b fc7711a b9e7b9b fc7711a b9e7b9b fc7711a fef84f3 fc7711a fef84f3 fc7711a fef84f3 fc7711a c24ea90 fc7711a e329457 fc7711a b9e7b9b fc7711a b9e7b9b fc7711a fef84f3 fc7711a fef84f3 fc7711a b9e7b9b fc7711a b9e7b9b fc7711a b9e7b9b fc7711a b9e7b9b fc7711a b9e7b9b fc7711a b9e7b9b fc7711a e0ad823 b9e7b9b e0ad823 c24ea90 b9e7b9b e0ad823 b9e7b9b e0ad823 b9e7b9b e0ad823 b9e7b9b e0ad823 b9e7b9b e0ad823 b9e7b9b e0ad823 b9e7b9b e0ad823 e329457 e0ad823 e329457 e0ad823 e329457 e0ad823 e329457 e0ad823 e329457 e0ad823 e329457 e0ad823 e329457 e0ad823 c24ea90 e0ad823 b9e7b9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
/* ============================================================================ */
/* 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 <main> 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);
}
|