/* ===================================================================== static-design-system — base.css Shared visual foundation for the bchen.dev static sites. Canonical design: "A New Error" (newerror.bchen.dev) — the "Ledger" direction: Spectral serif body, Helvetica sans UI, IBM Plex Mono. HOW COLOR WORKS Every color is a CSS custom property. The values below are DEFAULTS (newerror's palette). Each consuming site overrides ONLY these color tokens in its own colors.css, which loads AFTER this file. Fonts, spacing, typography, nav/footer chrome, and dark-mode behavior are shared and should NOT be re-declared per site. IMPORTANT: keep this file Liquid-safe. Its contents are passed through the Jekyll include tag by each site's served wrapper (assets/ds.css), so do NOT introduce Liquid delimiters (double-brace or brace-percent sequences). Plain CSS braces are fine. ===================================================================== */ :root { /* Type */ --serif: "Spectral", Georgia, "Times New Roman", serif; --sans: "Helvetica Neue", Helvetica, Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; /* Layout */ --measure: 760px; /* standard content column */ --read: 680px; /* narrower reading column (articles) */ --pad: 34px; --gutter: 104px; /* date column width (ledger layouts) */ } /* ---- Color tokens — DEFAULTS (newerror). Override per site in colors.css ---- */ :root, :root[data-theme="light"] { --bg: #FAFBFC; --ink: #1B2027; --muted: #69717C; --faint: #99A1AC; --rule: #E6E9EF; --rule-2: #b6b9be; --accent: #1463C7; --accent-hover: #0F4FA3; --field: #F1F3F6; } :root[data-theme="dark"] { --bg: #14171C; --ink: #E2E6EC; --muted: #9AA2AD; --faint: #69717C; --rule: #262B32; --rule-2: #5e6670; --accent: #6FA9F2; --accent-hover: #97C1F8; --field: #1D2128; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #14171C; --ink: #E2E6EC; --muted: #9AA2AD; --faint: #69717C; --rule: #262B32; --rule-2: #5e6670; --accent: #6FA9F2; --accent-hover: #97C1F8; --field: #1D2128; } } /* ===================================================================== Base ===================================================================== */ * { box-sizing: border-box; } html { -webkit-text-size-adjust: 100%; } body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background-color 0.25s ease, color 0.25s ease; } ::selection { background: color-mix(in oklab, var(--accent) 22%, transparent); } a { color: inherit; } /* ---- shell / responsive width ---- */ .shell { width: 100%; max-width: var(--measure); margin-inline: auto; padding-inline: var(--pad); } .page { min-height: 100vh; display: flex; flex-direction: column; } .page > main { flex: 1 0 auto; } /* ===================================================================== Top navigation ===================================================================== */ .nav { font-family: var(--sans); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 38px 0 18px; border-bottom: 1px solid var(--rule); } .nav.minimal { border-bottom: none; padding-bottom: 0; } .mast { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.005em; color: var(--ink); text-decoration: none; white-space: nowrap; } .mast:hover { color: var(--accent); } .nav-links { display: flex; align-items: baseline; gap: 26px; } .nav-links a, .iconbtn { font-family: var(--sans); font-size: 13.5px; letter-spacing: 0.01em; color: var(--muted); text-decoration: none; cursor: pointer; background: none; border: none; padding: 0; } .nav-links a:hover, .iconbtn:hover { color: var(--accent); } .nav-links a.active { color: var(--ink); } .nav-tools { display: flex; align-items: center; gap: 18px; } .iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); } .iconbtn:hover { color: var(--accent); background: var(--field); } .iconbtn svg { width: 15px; height: 15px; display: block; } /* hamburger — hidden on desktop */ .hamburger { display: none; } .mobile-menu { display: none; } /* ===================================================================== Footer ===================================================================== */ .foot { font-family: var(--sans); border-top: 1px solid var(--rule); margin-top: 20px; padding: 22px 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--faint); flex: 0 0 auto; } .foot a { color: var(--muted); text-decoration: none; } .foot a:hover { color: var(--accent); } .foot .rss-link { display: inline-flex; align-items: center; gap: 7px; } /* ===================================================================== Prose — reusable content typography (markdown pages, articles) Wrap rendered content in