/* The single palette and rhythm source. Day is warm parchment and ink; Night is the deep
   royal navy and gold of a village under the stars. Gold is ornament; gold-ink is text on the
   page; gold-light is text on navy. The walls (Home's sky, page bands, the welcome) are night
   navy in both themes. Text pairs meet WCAG AA (scripts/lab/audit.mjs checks them). */
:root {
 --navy:#1B2A4A; --navy-deep:#131F38; --navy-soft:#24365C; --gold:#C9A227; --gold-light:#E2C46A; --cream:#F6F0E1;
 --night:#14204A; --night-deep:#0C1536; --night-soft:#22336A; --on-night:#F3EBD6; --night-muted:#C3CBE0;
 --ink:var(--navy); --paper:var(--cream); --surface:#FFFCF5; --wash:#EDE5D3; --sheet:var(--paper);
 --muted:#596170; --line:#D9CFB9; --line-strong:#9C8C6D; --gold-ink:#725714;
 --teal:#236456; --teal-wash:#E4EEE5; --terracotta:#984D36; --rose-wash:#F5E6DE; --lapis:#34547C;
 --good:var(--teal); --bad:var(--terracotta);
 --scrim:#0C1536CC;
 /* Translucent gold and navy for hairlines, glass and shadows. */
 --gold-a25:#C9A22740; --gold-a33:#C9A22755; --gold-a40:#C9A22766; --gold-a50:#C9A22780; --gold-a60:#C9A22799;
 --navy-a20:#1B2A4A33; --navy-a60:#1B2A4A99; --shade-a25:#0A122340; --shade-a40:#0A122366;
 --terracotta-deep:#7E3F2C; --gold-deep:#725714;
 /* Filled controls (primary buttons, selected states), the illustration mat and switch knobs. */
 --fill:var(--navy); --on-fill:var(--cream); --fill-hover:var(--lapis); --fill-press:var(--navy-soft); --fill-accent:var(--gold-light);
 --mat:var(--night-deep); --knob:var(--surface); --strip:var(--night); --sky-opacity:.06;
 /* The vignettes: an evening sky, gold line work, lamplight. Same in both themes. */
 --vg-sky-top:#0B1433; --vg-sky-low:#22336A; --vg-ground:#091029; --vg-fill:#1E2D60; --vg-line:#D9B653; --vg-star:#F3EBD6;
 color-scheme:light;
 --display:'Cormorant Garamond',Georgia,serif; --body:'Source Sans 3',system-ui,sans-serif;
 --text-xs:.75rem; --text-sm:.875rem; --text-base:1rem; --text-lg:1.125rem;
 --title-sm:1.75rem; --title-md:2.25rem; --title-lg:3.25rem;
 /* Reading size for the tale and its layers: Settings → Text size. */
 --read-size:1.375rem; --layer-size:1.0625rem;
 --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px; --space-7:48px; --space-8:64px;
 --radius:10px; --radius-lg:20px; --shadow:0 12px 36px #1B2A4A0F; --shadow-lift:0 18px 48px #1B2A4A26; --shadow-sheet:0 24px 90px #101A3540;
 --content:1040px; --reading:720px; --ease:cubic-bezier(.2,.65,.3,1);
}
:root[data-text-size=small] {--read-size:1.1875rem; --layer-size:.96875rem}
:root[data-text-size=large] {--read-size:1.625rem; --layer-size:1.1875rem}
/* Night: the page itself becomes the night sky, deep royal navy with gold, as quiet as a
   room lit by one lamp. Every text pair is AA. */
:root[data-theme=night] {
 color-scheme:dark;
 --paper:#0B1433; --surface:#121D47; --wash:#1A2858; --ink:#EFE6CF; --sheet:#0F1A40;
 --muted:#AAB4CF; --line:#253669; --line-strong:#56679C; --gold-ink:#E2C46A;
 --teal:#7CC3AB; --teal-wash:#14363A; --terracotta:#E9A189; --rose-wash:#3A2232; --lapis:#9DB8EA;
 --terracotta-deep:#F2B6A1; --scrim:#03081ADD;
 --night:#0E1840; --night-deep:#070D26; --night-soft:#1B2A60;
 --fill:#D9B74F; --on-fill:#0B1433; --fill-hover:#E8C96E; --fill-press:#E8C96E; --fill-accent:#0B1433;
 --knob:var(--cream); --strip:var(--night-deep); --sky-opacity:.05;
 --shadow:0 12px 36px #0000003A; --shadow-lift:0 18px 48px #00000066; --shadow-sheet:0 24px 90px #000000B3;
}
@font-face {font-family:'Cormorant Garamond';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2')}
@font-face {font-family:'Cormorant Garamond';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2')}
@font-face {font-family:'Source Sans 3';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/source-sans-3-latin-400-normal.woff2') format('woff2')}
@font-face {font-family:'Source Sans 3';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/source-sans-3-latin-600-normal.woff2') format('woff2')}
