Adds --number-sections to the pandoc invocation and rewrites the header CSS so sections are visually separated from their titles: - TOC gets real disc/circle bullets with nesting - Each h1 starts with a top border and extra vertical rhythm - h2 gets its own lighter divider - Numbered sections (1, 2, 8.1, 8.2, ...) sit in a muted slot ahead of the title so the eye parses them as metadata, not as part of the heading text - TOC has a "Contents" label above the list - All colors still derived from the app palette (#f5f3ee background, #2e5b8a accent)
191 lines
4.5 KiB
HTML
191 lines
4.5 KiB
HTML
<style>
|
|
:root {
|
|
--bg: #f5f3ee;
|
|
--panel: #ffffff;
|
|
--ink: #1a1a1a;
|
|
--ink-muted: #5a5a5a;
|
|
--ink-faint: #8a8a8a;
|
|
--accent: #2e5b8a;
|
|
--accent-hover: #1f4470;
|
|
--border: #e2ddd2;
|
|
--border-strong: #c9c2b0;
|
|
--code-bg: #f0ede4;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
html, body {
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
"Helvetica Neue", Arial, sans-serif;
|
|
font-size: 16px;
|
|
line-height: 1.65;
|
|
margin: 0;
|
|
}
|
|
body {
|
|
max-width: 820px;
|
|
margin: 0 auto;
|
|
padding: 56px 36px 120px;
|
|
}
|
|
|
|
/* Title block */
|
|
header#title-block-header {
|
|
margin: 0 0 12px;
|
|
padding-bottom: 28px;
|
|
border-bottom: 1px solid var(--border-strong);
|
|
}
|
|
h1.title {
|
|
font-size: 48px;
|
|
font-weight: 700;
|
|
letter-spacing: -0.025em;
|
|
margin: 0 0 4px;
|
|
line-height: 1.1;
|
|
}
|
|
p.author, p.date { color: var(--ink-faint); margin: 0; font-size: 14px; }
|
|
|
|
/* Headings -- clear hierarchy with real breathing room between sections */
|
|
h1, h2, h3, h4 {
|
|
color: var(--ink);
|
|
letter-spacing: -0.012em;
|
|
line-height: 1.25;
|
|
}
|
|
h1 {
|
|
font-size: 30px;
|
|
font-weight: 700;
|
|
margin: 3.2em 0 0.8em;
|
|
padding: 1.2em 0 0.5em;
|
|
border-top: 2px solid var(--border-strong);
|
|
}
|
|
h1:first-of-type { border-top: none; padding-top: 0; margin-top: 2em; }
|
|
h2 {
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
margin: 2.4em 0 0.6em;
|
|
padding-top: 0.4em;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
h3 {
|
|
font-size: 17px;
|
|
font-weight: 600;
|
|
color: var(--ink-muted);
|
|
margin: 1.8em 0 0.5em;
|
|
}
|
|
/* Section numbers sit in their own visual slot so the title reads cleanly */
|
|
.header-section-number {
|
|
display: inline-block;
|
|
color: var(--ink-faint);
|
|
font-weight: 500;
|
|
margin-right: 0.55em;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
/* Body text */
|
|
p { margin: 0 0 1.1em; }
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { color: var(--accent-hover); text-decoration: underline; }
|
|
|
|
/* Inline + block code */
|
|
code {
|
|
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
|
font-size: 0.88em;
|
|
background: var(--code-bg);
|
|
padding: 0.12em 0.4em;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
pre {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 18px 22px;
|
|
overflow-x: auto;
|
|
font-size: 13px;
|
|
line-height: 1.55;
|
|
margin: 1.4em 0;
|
|
}
|
|
pre code {
|
|
background: transparent;
|
|
border: none;
|
|
padding: 0;
|
|
font-size: inherit;
|
|
}
|
|
.sourceCode { background: transparent; }
|
|
|
|
/* Table of contents -- real bullets, clear nesting */
|
|
nav#TOC {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 26px 36px 26px 28px;
|
|
margin: 32px 0 48px;
|
|
}
|
|
nav#TOC::before {
|
|
content: "Contents";
|
|
display: block;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.12em;
|
|
font-weight: 700;
|
|
color: var(--ink-faint);
|
|
margin-bottom: 14px;
|
|
}
|
|
nav#TOC ul {
|
|
list-style: disc;
|
|
padding-left: 1.35em;
|
|
margin: 0.35em 0;
|
|
}
|
|
nav#TOC > ul { padding-left: 1.1em; }
|
|
nav#TOC ul ul {
|
|
list-style: circle;
|
|
margin: 0.2em 0 0.35em;
|
|
}
|
|
nav#TOC li {
|
|
margin: 0.35em 0;
|
|
padding-left: 0.25em;
|
|
color: var(--ink-muted);
|
|
}
|
|
nav#TOC li::marker { color: var(--border-strong); }
|
|
nav#TOC a { color: var(--ink); }
|
|
nav#TOC a:hover { color: var(--accent); }
|
|
nav#TOC .toc-section-number {
|
|
color: var(--ink-faint);
|
|
font-variant-numeric: tabular-nums;
|
|
font-weight: 500;
|
|
margin-right: 0.45em;
|
|
}
|
|
|
|
/* Mermaid / figures */
|
|
figure, .mermaid, .diagram {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 22px;
|
|
margin: 28px 0;
|
|
text-align: center;
|
|
}
|
|
figure img, figure svg, p img { max-width: 100%; height: auto; }
|
|
|
|
/* Callouts */
|
|
blockquote {
|
|
border-left: 3px solid var(--accent);
|
|
margin: 1.3em 0;
|
|
padding: 0.25em 1.1em;
|
|
color: var(--ink-muted);
|
|
background: var(--panel);
|
|
border-radius: 0 6px 6px 0;
|
|
}
|
|
|
|
/* Body bullet lists (outside TOC) */
|
|
body > ul, body > ol,
|
|
h1 ~ ul, h1 ~ ol, h2 ~ ul, h2 ~ ol, h3 ~ ul, h3 ~ ol {
|
|
padding-left: 1.4em;
|
|
}
|
|
|
|
@media (max-width: 720px) {
|
|
body { padding: 32px 20px 80px; }
|
|
h1.title { font-size: 36px; }
|
|
h1 { font-size: 24px; }
|
|
h2 { font-size: 19px; }
|
|
nav#TOC { padding: 22px 26px; }
|
|
}
|
|
</style>
|