:root {
    /* ── Dark palette (warm notebook) ──────────────────────────────────────── */
    --color-paper:          #1A1814;   /* page background — warm near-black */
    --color-canvas:         #22201B;   /* card surfaces, form backgrounds */
    --color-ink:            #EDE8DF;   /* primary text — warm cream */
    --color-ink-2:          #B8B0A4;   /* body text — muted warm */
    --color-ink-muted:      #90887E;   /* labels, timestamps, captions */
    --color-border:         #2E2B25;   /* standard dividers */
    --color-border-soft:    #252219;   /* subtle dividers */
    --color-accent:         #2E9880;   /* teal — lightened for dark contrast */
    --color-accent-hover:   #287A68;   /* hover/pressed teal */
    --color-accent-light:   #1A2E29;   /* pale teal tint backgrounds */
    --color-accent-on:      #FFFFFF;   /* text on accent surfaces */
    --color-surface-raised: #2A2720;   /* elevated surfaces: tooltips, hover */
    --color-ink-inverse:    #17171A;   /* text on accent-coloured buttons */
    --color-error:          #c0392b;   /* validation errors, form error status */

    /* ── Glass overlays (paper colour at opacity, for story components) ── */
    --color-paper-glass-low:   color-mix(in srgb, var(--color-paper) 8%, transparent);
    --color-paper-glass-mid:   color-mix(in srgb, var(--color-paper) 25%, transparent);
    --color-paper-glass-high:  color-mix(in srgb, var(--color-paper) 55%, transparent);
    --color-paper-glass-hover: color-mix(in srgb, var(--color-paper) 80%, transparent);

    /* ── Fonts ───────────────────────────────────────────────── */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-ui:      'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* ── Type scale ──────────────────────────────────────────── */
    --text-xs:    0.75rem;
    --text-sm:    0.875rem;
    --text-base:  1rem;
    --text-md:    1.125rem;
    --text-lg:    1.375rem;
    --text-xl:    1.75rem;
    --text-2xl:   2.25rem;
    --text-3xl:   3rem;
    --text-story: 1.0625rem; /* long-form reading size: story body + scrolly steps */

    /* ── Leading ─────────────────────────────────────────────── */
    --leading-tight:  1.2;
    --leading-snug:   1.35;
    --leading-normal: 1.65;
    --leading-story:  1.85; /* relaxed reading rhythm for story long-form */

    /* ── Tracking ────────────────────────────────────────────── */
    --tracking-caps:     0.07em;   /* uppercase UI labels: dates, badges, sidebar headings */
    --tracking-display:  -0.015em; /* display headings: text-xl and text-2xl */
    --tracking-display-sm: -0.01em; /* display headings: text-lg and smaller; site logotype */

    /* ── Spacing (4px grid) ──────────────────────────────────── */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ── Radius ──────────────────────────────────────────────── */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-full: 9999px;

    /* ── Shadows ─────────────────────────────────────────────── */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.14);

    /* ── Layout ──────────────────────────────────────────────── */
    --content-width:      720px;
    --site-header-height: 60px;
}
