/* Ribbonleaf design tokens.
   Direction: a reading room. Cool green-tinted paper by day, lamp-lit green-black by night.
   Signature: the highlighter stroke (--accent) marks whatever is active or in progress.
   Ribbon red (--ribbon) is reserved for bookmarks and nothing else; the ribbon marker in
   the brand mark is one (src/lib/brand.js). */

@font-face {
  font-family: "Literata Variable";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../../vendor/fonts/literata-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Literata Variable";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../../vendor/fonts/literata-latin-ext-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Literata Variable";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../../vendor/fonts/literata-latin-wght-italic.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Schibsted Grotesk Variable";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../vendor/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Schibsted Grotesk Variable";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../vendor/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  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;
}

:root {
  /* Type */
  --font-display: "Literata Variable", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: "Schibsted Grotesk Variable", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;    /* 12 — captions, counters */
  --text-sm: 0.8125rem;  /* 13 — secondary UI */
  --text-md: 0.9375rem;  /* 15 — body UI */
  --text-lg: 1.125rem;   /* 18 — card titles */
  --text-xl: 1.5rem;     /* 24 — section titles */
  --text-2xl: 2.125rem;  /* 34 — view titles */
  --text-3xl: 3rem;      /* 48 — hero */

  /* Space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;
  --r-book: 2px 5px 5px 2px; /* spine side is squarer */

  /* Layout */
  --rail-w: 76px;
  --tabbar-h: 60px;
  --reader-bottombar-h: 48px; /* the reader's bottom bar (reader.css) — here because toasts and the import tray float above it */
  --content-max: 1180px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in: cubic-bezier(.5, 0, .9, .4);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 380ms;

  /* Constant hues */
  --accent: #FFD23F;        /* highlighter */
  --accent-ink: #2A2100;    /* text on highlighter */

  /* Highlight inks (annotation colors). Used with multiply on light pages, see reader. */
  --hl-yellow: #FFD23F;
  --hl-green: #7EDC9A;
  --hl-blue: #7CC4FF;
  --hl-pink: #FF9EC0;
  --hl-purple: #C3A6FF;

  --z-rail: 20;
  --z-chrome: 30;
  --z-popover: 60;
  --z-toast: 80;
}

/* ---------- Day ---------- */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #EDF1EB;
  --surface: #F7F9F5;
  --surface-2: #E2E8DF;
  --raised: #FFFFFF;
  --ink: #14251F;
  --ink-2: #44574D;
  --ink-3: #56675D;                         /* quietest text: still 4.5:1 on every surface, hovered rows included */
  --line: rgba(20, 37, 31, .12);
  --line-strong: rgba(20, 37, 31, .24);
  --brand: #1F5A47;
  --brand-ink: #F3F7F1;
  --brand-soft: rgba(31, 90, 71, .10);
  --ribbon: #C2313B;
  --danger: #A13D12;                        /* rust, well away from the ribbon's crimson */
  --danger-soft: rgba(161, 61, 18, .10);
  --mark: rgba(255, 210, 63, .85);          /* highlighter stroke behind active text */
  --accent-edge: rgba(42, 33, 0, .22);      /* hairline that keeps yellow crisp on paper */
  --hover: rgba(20, 37, 31, .06);
  --pressed: rgba(20, 37, 31, .11);
  --scrim: rgba(13, 24, 20, .42);
  --focus: #1F5A47;
  --shadow-1: 0 1px 2px rgba(20, 37, 31, .08), 0 1px 1px rgba(20, 37, 31, .04);
  --shadow-2: 0 6px 18px -6px rgba(20, 37, 31, .22), 0 2px 5px rgba(20, 37, 31, .08);
  --shadow-3: 0 24px 60px -18px rgba(20, 37, 31, .38), 0 6px 16px rgba(20, 37, 31, .10);
  --shadow-book: 0 1px 1px rgba(20, 37, 31, .18), 0 10px 22px -10px rgba(20, 37, 31, .45), 0 3px 6px -2px rgba(20, 37, 31, .18);
  --reader-bg: #DDE3DA;                     /* desk behind the pages */
}

/* ---------- Night ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1412;
  --surface: #131C19;
  --surface-2: #1A2522;
  --raised: #1F2B27;
  --ink: #E3EAE4;
  --ink-2: #A6B4AB;
  --ink-3: #94A39A;
  --line: rgba(227, 234, 228, .10);
  --line-strong: rgba(227, 234, 228, .22);
  --brand: #84D4B4;
  --brand-ink: #0B1713;
  --brand-soft: rgba(132, 212, 180, .12);
  --ribbon: #E8545E;
  --danger: #FF9B72;
  --danger-soft: rgba(255, 155, 114, .12);
  --mark: rgba(255, 210, 63, .30);
  --accent-edge: transparent;
  --hover: rgba(227, 234, 228, .07);
  --pressed: rgba(227, 234, 228, .12);
  --scrim: rgba(3, 7, 6, .62);
  --focus: #FFD23F;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 22px -8px rgba(0, 0, 0, .7), 0 2px 5px rgba(0, 0, 0, .35);
  --shadow-3: 0 28px 70px -20px rgba(0, 0, 0, .85), 0 6px 16px rgba(0, 0, 0, .4);
  --shadow-book: 0 1px 1px rgba(0, 0, 0, .5), 0 12px 24px -10px rgba(0, 0, 0, .8), 0 3px 6px -2px rgba(0, 0, 0, .5);
  --reader-bg: #080D0B;
}

@media (max-width: 720px) {
  :root { --reader-bottombar-h: max(66px, 4.125rem); } /* two rows on phones; grows with large text */
}
