/* ============================================================================
Prose — how a rendered cheatsheet reads.
The body is paper. The code is not: every block is a dark plate, in both
modes, exactly as the main site sets them. That is the page's core
rhythm — terminal output pasted into a printed document — and it is why
the blocks do not follow the theme. A code block that turns cream in
light mode stops being a terminal and becomes a quotation.
========================================================================== */
.prose { color: var(--fg); font-size: 17.5px; line-height: 1.68; letter-spacing: -0.003em; max-width: 78ch; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); scroll-margin-top: 92px; }
/* Empty MkDocs-anchor aliases inside mirrored headings (see astro.config.mjs).
They are the scroll target for canonical upstream deep links, so they need
the same offset or the heading lands behind the sticky header. */
.prose .anchor-alias { scroll-margin-top: 92px; }
.prose h2 {
font-size: clamp(1.35rem, 2.2vw, 1.75rem);
font-weight: 700;
font-stretch: 84%;
letter-spacing: -0.03em;
line-height: 1;
text-transform: uppercase;
margin-top: 2.6rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--fg);
}
.prose h3 {
font-size: 1.18rem; font-weight: 700; letter-spacing: -0.02em;
line-height: 1.15; margin-top: 2rem; color: var(--fg);
}
.prose h4 {
font-family: var(--font-mono);
font-size: 11px; letter-spacing: var(--track-micro); text-transform: uppercase;
margin-top: 1.6rem; color: var(--fg-faint);
}
.prose p { color: var(--fg); text-wrap: pretty; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose em { color: var(--fg-dim); }
/* ---- Drop cap ------------------------------------------------------------ */
/* The opening letter of a sheet, floated three lines deep in EB Garamond.
Set on a span rather than with `::first-letter` for two reasons: the
pseudo-element cannot be given a different family and weight reliably
across engines at this size, and — the real one — the letter stays real
selectable, searchable text this way, read as part of the word it opens
rather than as decoration sitting beside it.
The rehype pass that splits it out (see `rehypeDropCap` in
astro.config.mjs) skips short openers, so an image caption or a
one-line note is left alone. */
.prose .cap {
float: left;
font-family: var(--font-lockup);
font-size: 72px;
font-weight: 600;
line-height: 0.74;
color: var(--love);
margin: 5px 0.85rem 0 0;
}
.prose a {
color: var(--accent);
text-decoration: underline;
text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent);
text-underline-offset: 3px;
transition: text-decoration-color 200ms ease;
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-top: 0.35rem; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--fg-faint); font-family: var(--font-mono); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4rem 0; }
/* Inline code — a tinted slug on the page, square, hairline-bordered. This
is the one place the paper carries code, and it stays paper-coloured;
the dark treatment is reserved for blocks. */
.prose :not(pre) > code {
font-family: var(--font-mono);
font-size: 0.86em;
padding: 0.14em 0.4em;
background: var(--code-bg);
border: 1px solid var(--rule);
color: var(--rose);
word-break: break-word;
}
/* ---- Callouts (blockquotes) --------------------------------------------- */
/* Every blockquote is a terminal callout: a square plate framed by corner
brackets (`.corners`, added in app.ts) with a left accent bar and, when the
source used a GitHub/Obsidian `> [!type]` marker, a mono type label
(`enhanceCallouts` in app.ts strips the marker and inserts `.callout__label`).
Cross-theme by contract, mirroring the code panes in reverse: on the cream
page a callout is a NIGHT plate so it reads as a terminal; on the night page
it flips to a DAWN (cream) plate — paper floating on the dark. Plain
blockquotes with no marker get the same frame, just no label. */
.prose blockquote {
/* Default (cream page): pin the night palette for this subtree, like
`.plate`, so the callout is a terminal. */
--base: var(--color-night-base); --surface: var(--color-night-surface); --overlay: var(--color-night-overlay);
--text: var(--color-night-text); --subtle: var(--color-night-subtle); --muted: var(--color-night-muted);
--love: var(--color-night-love); --gold: var(--color-night-gold); --rose: var(--color-night-rose);
--pine: var(--color-night-foam); --foam: var(--color-night-foam); --iris: var(--color-night-iris);
--rule: var(--color-night-rule);
--fg: var(--text); --fg-dim: var(--subtle); --fg-faint: var(--muted);
--accent: var(--iris);
--callout-accent: var(--foam);
--bracket: var(--love);
position: relative;
background: var(--surface);
color: var(--fg-dim);
border: 1px solid var(--rule);
border-left: 2px solid var(--callout-accent);
padding: 0.95rem 1.15rem;
margin-block: 1.5rem;
}
/* Night page: flip the same object to a dawn (cream) plate. */
:root[data-theme='dark'] .prose blockquote {
--base: var(--color-dawn-base); --surface: var(--color-dawn-surface); --overlay: var(--color-dawn-overlay);
--text: var(--color-dawn-ink); --subtle: var(--color-dawn-subtle); --muted: var(--color-dawn-muted);
--love: var(--color-dawn-love-soft); --gold: var(--color-dawn-gold-soft); --rose: var(--color-dawn-rose-soft);
--pine: var(--color-dawn-pine-soft); --foam: var(--color-dawn-foam-soft); --iris: var(--color-dawn-iris-soft);
--rule: var(--color-dawn-rule);
--accent: var(--iris);
}
.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose blockquote p { margin-top: 0.55rem; color: var(--fg-dim); }
.prose blockquote strong { color: var(--fg); }
.prose blockquote em { color: var(--fg-dim); }
.prose blockquote a { color: var(--accent); text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.prose blockquote ul li::marker { color: var(--callout-accent); }
/* Inline code in a callout rides the pinned overlay, so it keeps contrast on
the night plate and on the dawn plate both. */
.prose blockquote :not(pre) > code {
background: var(--overlay);
border-color: var(--rule);
color: var(--rose);
}
/* The typed label — the mono micro-header a `[!type]` marker becomes. */
.callout__label {
display: inline-flex; align-items: center; gap: 0.5rem;
font-family: var(--font-mono); font-size: 10px;
letter-spacing: var(--track-micro); text-transform: uppercase;
line-height: 1; color: var(--callout-accent);
margin-bottom: 0.7rem;
}
.callout__label::before { content: '//'; opacity: 0.6; }
/* Re-key the accent bar + label per kind. Qualified with `.prose blockquote`
so these out-rank the base blockquote's own `--callout-accent`. */
.prose blockquote[data-callout] { border-left-color: var(--callout-accent); }
.prose blockquote[data-callout='warning'] { --callout-accent: var(--gold); }
.prose blockquote[data-callout='danger'] { --callout-accent: var(--love); --bracket: var(--love); }
.prose blockquote[data-callout='tip'],
.prose blockquote[data-callout='success'] { --callout-accent: var(--foam); }
.prose blockquote[data-callout='note'],
.prose blockquote[data-callout='info'] { --callout-accent: var(--pine); }
.prose blockquote[data-callout='question'],
.prose blockquote[data-callout='example'],
.prose blockquote[data-callout='quote'] { --callout-accent: var(--iris); }
/* Tables — a ruled table, not a card with a table in it. */
.prose .table-scroll { overflow-x: auto; border: 1px solid var(--rule); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose thead th {
background: var(--wash-strong);
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: var(--track-micro);
text-transform: uppercase; color: var(--fg-dim);
text-align: left; padding: 0.62rem 0.8rem; white-space: nowrap;
border-bottom: 1px solid var(--rule);
}
.prose tbody td { padding: 0.58rem 0.8rem; border-top: 1px solid var(--rule); vertical-align: top; }
.prose tbody tr:hover { background: var(--wash); }
.prose img { border: 1px solid var(--rule); margin-inline: auto; }
/* Rendered workflow diagrams are supplied alongside editable Mermaid source.
The caption behaves like a terminal status bar while the Dawn artwork stays
on its intended light plate in either site theme. */
.prose .diagram-plate {
position: relative;
max-width: min(100%, 96ch);
border: 1px solid var(--rule);
background: var(--color-dawn-base);
overflow: hidden;
}
.prose .diagram-plate__image {
display: block;
padding: clamp(0.65rem, 2vw, 1.25rem);
background: var(--color-dawn-base);
text-decoration: none;
}
.prose .diagram-plate img {
width: auto;
max-height: min(76vh, 1050px);
border: 0;
object-fit: contain;
}
.prose .diagram-plate figcaption {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.65rem 1.2rem;
padding: 0.65rem 0.8rem;
border-top: 1px solid var(--rule);
background: var(--surface);
color: var(--fg-dim);
font-family: var(--font-mono);
font-size: var(--step-micro);
letter-spacing: var(--track-micro);
text-transform: uppercase;
}
.prose .diagram-plate__downloads { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.prose .diagram-plate__downloads a { color: var(--accent); text-decoration: none; }
.prose .diagram-plate__downloads a:hover { text-decoration: underline; }
@media (max-width: 560px) {
.prose .diagram-plate figcaption { align-items: flex-start; flex-direction: column; }
}
/* ---- Code blocks --------------------------------------------------------- */
/* A figure on the plate, with its caption above the code: the language at
the left, the copy control at the right, both in the 9.5px mono the rest
of the site labels things in. No window chrome, no traffic-light dots —
this is a printed listing of terminal output, not a simulated window. */
.code-pane {
position: relative;
background: var(--plate);
padding: 1rem 1.4rem 1.4rem;
/* Runs past the prose measure at wide viewports, because a fixed-width
terminal listing is the one thing on the page that genuinely needs
more than 74ch and wraps badly under it. */
max-width: min(100%, 92ch);
}
/* app.ts tags the pane `.plate`, so `--iris`/`--foam`/`--love` resolve to
their night values in this subtree in both modes — the caption colours and
the corner brackets stay terminal-toned on the cream page without hardcoded
hex. The titlebar closes with a hairline rule, tmux-style. */
.code-pane__bar {
display: flex; align-items: center; justify-content: space-between;
gap: 1rem;
margin-bottom: 0.9rem;
padding-bottom: 0.7rem;
border-bottom: 1px solid var(--rule);
}
.code-pane__lang {
font-family: var(--font-mono); font-size: 9.5px;
letter-spacing: 0.18em; text-transform: uppercase;
color: var(--iris);
}
.code-copy {
display: inline-flex; align-items: center; gap: 0.45rem;
font-family: var(--font-mono); font-size: 9.5px;
letter-spacing: 0.18em; text-transform: uppercase;
color: var(--foam);
transition: color 200ms ease;
}
.code-copy:hover { color: var(--text); }
.code-copy.copied { color: var(--gold); }
.code-copy svg { width: 11px; height: 11px; }
/* The scanline film sits at z-index 1 over the plate; the titlebar and the
listing ride above it so the CRT texture shows through the transparent code
background between glyphs without ever washing over the text. Softened for
code because legibility outranks the effect here. */
.code-pane > .code-pane__bar,
.code-pane > pre { position: relative; z-index: 2; }
.code-pane > .scanlines { opacity: 0.5; }
.prose pre.astro-code {
margin: 0;
padding: 0;
overflow-x: auto;
font-size: 13px;
line-height: 1.7;
background: transparent !important;
color: var(--color-night-text);
}
/* Gruvbox's syntax colours (astro.config.mjs inlines them as variables). */
:root[data-palette='gruvbox'] .astro-code,
:root[data-palette='gruvbox'] .astro-code span {
color: var(--shiki-gruvbox) !important;
}
.prose pre.astro-code code {
font-family: var(--font-mono);
display: block;
/* Wrapped rather than scrolled: a cheatsheet's value is the whole
command being visible and copyable at a glance, and a long
`--script-args` tail hidden behind a horizontal scrollbar is the one
thing most likely to be pasted wrong. */
white-space: pre-wrap;
word-break: break-word;
}
/* First heading of the doc is the page title (rendered separately) */
.prose > h1:first-child { display: none; }