/* Fonts (SIL Open Font License), self-hosted; copied from @fontsource packages: Alegreya, Onest, JetBrains Mono. */
/* alegreya-cyrillic-400-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/alegreya-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* alegreya-latin-ext-400-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/alegreya-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* alegreya-latin-400-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/alegreya-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* alegreya-cyrillic-500-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/alegreya-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* alegreya-latin-ext-500-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/alegreya-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* alegreya-latin-500-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/alegreya-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* alegreya-cyrillic-700-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/alegreya-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* alegreya-latin-ext-700-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/alegreya-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* alegreya-latin-700-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/alegreya-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* alegreya-cyrillic-800-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/fonts/alegreya-cyrillic-800-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* alegreya-latin-ext-800-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/fonts/alegreya-latin-ext-800-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* alegreya-latin-800-normal */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/fonts/alegreya-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* alegreya-cyrillic-400-italic */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/alegreya-cyrillic-400-italic.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* alegreya-latin-ext-400-italic */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/alegreya-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* alegreya-latin-400-italic */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/alegreya-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* alegreya-cyrillic-500-italic */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/alegreya-cyrillic-500-italic.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* alegreya-latin-ext-500-italic */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/alegreya-latin-ext-500-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* alegreya-latin-500-italic */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/alegreya-latin-500-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-400-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/onest-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-ext-400-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/onest-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* onest-latin-400-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/onest-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-500-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/onest-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-ext-500-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/onest-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* onest-latin-500-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/onest-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-600-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/onest-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-ext-600-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/onest-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* onest-latin-600-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/onest-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-700-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/onest-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-ext-700-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/onest-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* onest-latin-700-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/onest-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* jetbrains-mono-cyrillic-400-normal */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/jetbrains-mono-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* jetbrains-mono-latin-ext-400-normal */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/jetbrains-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* jetbrains-mono-latin-400-normal */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* jetbrains-mono-cyrillic-500-normal */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/jetbrains-mono-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* jetbrains-mono-latin-ext-500-normal */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/jetbrains-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* jetbrains-mono-latin-500-normal */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ==========================================================================
   librorus.com — "Birch & Ink" design system (handoff of Oct 2026).
   Tokens are ported 1:1 from design/tokens/*.css.
   ========================================================================== */

:root {
  /* Birch — paper & bark neutrals */
  --birch-0: #ffffff;
  --birch-50: #faf8f3;
  --birch-100: #f3efe6;
  --birch-200: #e6e0d3;
  --birch-300: #cfc7b7;
  --birch-500: #8c8475;
  --birch-700: #4e4940;
  --bark-900: #1c1a17;

  /* Leaf — primary, from the birch leaf in the logo */
  --leaf-50: #eef6e6;
  --leaf-100: #d9ecc6;
  --leaf-300: #9bcb6c;
  --leaf-500: #4e9a2a;
  --leaf-600: #3e8220;
  --leaf-700: #2f6618;
  --leaf-900: #1b3d0e;

  /* Illustration accents */
  --terracotta-500: #d9694a;
  --terracotta-100: #f8ddd3;
  --ochre-500: #e6b34a;
  --ochre-100: #faebc6;
  --ultramarine-500: #3f4fa0;
  --ultramarine-100: #dce0f3;

  /* Subject colours (catalogue tagging) */
  --subject-science: var(--ultramarine-500);
  --subject-history: var(--terracotta-500);
  --subject-nature: var(--leaf-600);
  --subject-culture: #9a5ba6;
  --subject-comics: var(--ochre-500);

  /* Semantic */
  --bg-page: var(--birch-0);
  --bg-sunken: var(--birch-100);
  --bg-card: var(--birch-0);
  --fg-1: var(--bark-900);
  --fg-2: var(--birch-700);
  --fg-3: var(--birch-500);
  --fg-inverse: var(--birch-50);
  --fg-accent: var(--leaf-700);
  --border-hairline: var(--birch-200);
  --border-strong: var(--bark-900);
  --accent: var(--leaf-600);
  --accent-hover: var(--leaf-700);
  --accent-soft: var(--leaf-50);
  --focus-ring: var(--leaf-500);
  --danger: #b83a26;

  /* Type */
  --font-display: 'Alegreya', 'PT Serif', Georgia, serif;
  --font-body: 'Onest', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --text-display-xl: 88px;
  --lh-display-xl: 0.98;
  --text-display-l: 64px;
  --lh-display-l: 1.02;
  --text-h1: 44px;
  --lh-h1: 1.08;
  --text-h2: 32px;
  --lh-h2: 1.15;
  --text-h3: 24px;
  --lh-h3: 1.2;
  --text-lead: 20px;
  --lh-lead: 1.5;
  --text-body: 17px;
  --lh-body: 1.6;
  --text-small: 14px;
  --lh-small: 1.45;
  --text-eyebrow: 12px;
  --tracking-eyebrow: 0.14em;
  --text-mono: 13px;
  --tracking-display: -0.02em;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 144px;
  --container-max: 1280px;
  --page-pad: 56px; /* side padding; 20px on phones */
  --section: 96px; /* vertical rhythm between sections */

  --radius-1: 3px;
  --radius-2: 6px;
  --radius-3: 12px;
  --radius-pill: 999px;
  --border-1: 1px solid var(--border-hairline);
  --border-ink: 1.5px solid var(--border-strong);

  --shadow-1: 0 1px 2px rgba(28, 26, 23, 0.08);
  --shadow-2: 0 2px 4px rgba(28, 26, 23, 0.06), 0 8px 20px rgba(28, 26, 23, 0.08);
  --shadow-3: 0 4px 8px rgba(28, 26, 23, 0.08), 0 20px 44px rgba(28, 26, 23, 0.14);
  --shadow-cover: inset 3px 0 0 rgba(255, 255, 255, 0.18), inset 5px 0 6px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(28, 26, 23, 0.1), 0 14px 28px rgba(28, 26, 23, 0.14);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;

  /* Names read by /assets/js/request-pdf.js (the PDF request pop-up) */
  --surface-card: var(--birch-0);
  --surface-200: var(--birch-100);
  --ink: var(--fg-1);
  --ink-muted: var(--fg-2);
  --border: var(--birch-300);
  --accent-500: var(--leaf-600);
  --accent-700: var(--leaf-700);
  --radius-lg: var(--radius-3);
  --font-sans: var(--font-body);

  color-scheme: light;
}

@media (max-width: 768px) {
  :root {
    --page-pad: 20px;
    --section: 64px;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--fg-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--leaf-900);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  margin: 0;
  color: var(--fg-1);
}

h1 {
  font-size: clamp(40px, 5vw, var(--text-display-l));
  line-height: var(--lh-display-l);
}

h2 {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
}

p {
  margin: 0;
  text-wrap: pretty;
}

@media (max-width: 768px) {
  h2 {
    font-size: 34px;
  }
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.page {
  padding-top: var(--space-8);
  padding-bottom: var(--section);
}

.section {
  padding-top: var(--section);
}

.stack {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

/* Section header: title on the left, text link on the right */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

/* Page heading row with a strong ink rule under it */
.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: var(--border-ink);
}

.page-head h1 {
  font-size: clamp(40px, 5vw, var(--text-display-l));
}

/* ---------- Text styles ---------- */

.eyebrow {
  font: 600 var(--text-eyebrow) / 1.3 var(--font-body);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-accent);
  margin: 0;
}

.lede {
  font-size: var(--text-lead);
  line-height: var(--lh-lead);
  color: var(--fg-2);
}

.muted {
  color: var(--fg-2);
}

.small {
  font-size: var(--text-small);
  line-height: var(--lh-small);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: 500;
}

.num {
  font: 500 13px var(--font-mono);
  color: var(--fg-accent);
}

.prose {
  max-width: 62ch;
  color: var(--fg-2);
  display: grid;
  gap: var(--space-4);
}

.prose :where(p, ul, ol) {
  margin: 0;
}

.prose strong {
  color: var(--fg-1);
  font-weight: 600;
}

.title-sub {
  font-weight: 500;
  font-style: italic;
}

/* Text link CTA: "See the catalogue →" */
.link-cta {
  font: 600 15px / 1.4 var(--font-body);
  color: var(--fg-accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font: 600 15px / 1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn--lg {
  height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn--block {
  display: flex;
  width: 100%;
  height: 50px;
}

.btn--ghost {
  background: transparent;
  border-color: var(--bark-900);
  color: var(--fg-1);
}

.btn--ghost:hover {
  background: var(--bark-900);
  border-color: var(--bark-900);
  color: var(--birch-50);
}

.btn--ghost.btn--soft:hover {
  background: var(--birch-100);
  color: var(--fg-1);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Covers and book cards ---------- */

.cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-1);
  overflow: hidden;
  background: var(--birch-100);
  box-shadow: var(--shadow-cover);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11px / 1.3 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.subject::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--fg-3));
}

.subject--science { --dot: var(--subject-science); }
.subject--history { --dot: var(--subject-history); }
.subject--nature { --dot: var(--subject-nature); }
.subject--culture { --dot: var(--subject-culture); }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--birch-0);
  color: var(--fg-accent);
  font: 700 11px / 1.3 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Filter chips ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--birch-300);
  background: transparent;
  color: var(--fg-1);
  font: 500 14px / 1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.chip:hover {
  border-color: var(--bark-900);
  color: var(--fg-1);
}

.chip__count {
  color: var(--fg-3);
}

.chip[aria-pressed='true'],
.chip[aria-current='true'] {
  background: var(--bark-900);
  border-color: var(--bark-900);
  color: var(--birch-50);
  font-weight: 600;
}

.chip[aria-pressed='true'] .chip__count,
.chip[aria-current='true'] .chip__count {
  color: inherit;
  opacity: 0.7;
  font-weight: 400;
}

/* ---------- Fact strip ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: var(--border-ink);
  border-bottom: var(--border-1);
}

.fact {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 24px 24px 24px 0;
}

.fact__n {
  font: 700 40px / 1 var(--font-display);
}

.fact__l {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-2);
}

@media (max-width: 768px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fact {
    padding: 20px 16px 20px 0;
  }
  .fact__n {
    font-size: 34px;
  }
}

/* ---------- Soft CTA panel ---------- */

.cta-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 40px 48px;
  padding: 56px;
  background: var(--leaf-50);
  border: 1px solid var(--leaf-100);
  border-radius: var(--radius-3);
}

.cta-panel .eyebrow {
  color: var(--leaf-700);
}

@media (max-width: 768px) {
  .cta-panel {
    padding: 32px 24px;
  }
}

/* ---------- Country tags ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--birch-300);
  font: 500 14px / 1 var(--font-body);
  color: var(--fg-1);
}

.tag--more {
  border-color: transparent;
  background: var(--birch-100);
  color: var(--fg-2);
}

/* ---------- Utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: #fff;
  color: var(--fg-1);
  padding: 8px 16px;
  border-radius: var(--radius-2);
}

.skip-link:focus {
  left: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Forms (contact page) ---------- */

.form {
  display: grid;
  gap: 16px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg-2);
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--birch-300);
  border-radius: var(--radius-2);
  background: #fff;
  color: var(--fg-1);
  font: 16px / 1.4 var(--font-body);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field input:hover,
.field textarea:hover {
  border-color: var(--birch-500);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--leaf-500);
}

.form__status {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-2);
  font-size: 15px;
}

.form__status[data-kind='ok'] {
  background: var(--leaf-50);
  border: 1px solid var(--leaf-100);
  color: var(--leaf-900);
}

.form__status[data-kind='error'] {
  background: #f8e1dc;
  color: #8f2318;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
