/* Shiur Reader app design tokens (from docs/design/tokens.css).
   Inter and Newsreader have no Hebrew, so Hebrew letters in any text fall through to Frank Ruhl Libre.
   Light mode only for now. The tokens are semantic, so a later [data-theme=dark] only remaps them.
   Brand values match landing-dist/styles.css so the site and the app read as one product.
   Fonts are self-hosted (fonts/, SIL Open Font License 1.1, see the *-OFL.txt files):
   Inter (rsms/inter), Newsreader (productiontype/Newsreader), Frank Ruhl Libre (fontef/frankruhllibre). */

@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/Newsreader-latin-wght.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;
}
@font-face {
  font-family: "Frank Ruhl Libre";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/FrankRuhlLibre-hebrew-400.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Frank Ruhl Libre";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/FrankRuhlLibre-hebrew-500.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

:root {
  /* ---- Color: canvas and surfaces ---- */
  --color-paper: #f7f3ea;          /* page canvas, same as landing */
  --color-paper-deep: #efe7d7;     /* wells, progress track, code blocks */
  --color-surface: #fffdf8;        /* raised panels, inputs, cards */
  --color-surface-hover: #fbf7ee;

  /* ---- Color: ink (stone, as on landing) ---- */
  --color-ink: #1c1917;            /* headings, strong text (stone-950-ish) */
  --color-text: #292524;           /* body (stone-800) */
  --color-muted: #57534e;          /* secondary text (stone-600) */
  --color-subtle: #78716c;         /* hints, meta (stone-500) */
  --color-line: rgb(28 25 23 / 0.10);   /* dividers, table rows */
  --color-line-strong: rgb(28 25 23 / 0.16); /* input rings, secondary button ring */

  /* ---- Color: brand ---- */
  --color-pine-50: #eef4f0;
  --color-pine-100: #d9e7de;
  --color-pine-600: #3a6e5f;
  --color-pine-700: #2f5d50;       /* primary actions, links, focus */
  --color-pine-800: #244a40;       /* primary hover */
  --color-gold-100: #faf0d2;
  --color-gold-200: #f3dfa6;       /* the "spoken word" highlight */
  --color-gold-300: #ebcd7c;
  --color-gold-800: #6e5312;

  /* ---- Color: feedback ---- */
  --color-danger: #9b2c1f;         /* refusals, failed Builds, Delete */
  --color-danger-soft: #f7e4df;
  --color-danger-line: rgb(155 44 31 / 0.22);
  --color-warn: #7a5410;           /* waiting Builds, Spending Cap near */
  --color-warn-soft: var(--color-gold-100);
  --color-warn-line: rgb(122 84 16 / 0.22);
  --color-success: var(--color-pine-700);
  --color-success-soft: var(--color-pine-50);

  --color-focus: var(--color-pine-700);

  /* ---- Type ---- */
  --font-sans: InterVariable, "Frank Ruhl Libre", ui-sans-serif, system-ui, sans-serif;
  --font-sans-features: "cv02", "cv03", "cv04", "cv11";
  --font-display: "Newsreader", "Frank Ruhl Libre", ui-serif, Georgia, serif;          /* page titles, wordmark */
  --font-hebrew: "Frank Ruhl Libre", "Newsreader", serif;          /* Hebrew/Aramaic titles */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* size / line-height pairs (desktop). Phone bumps body and controls to 16px. */
  --text-xs: 0.75rem;   --text-xs-lh: 1rem;       /* table headings only, never body */
  --text-sm: 0.875rem;  --text-sm-lh: 1.5rem;     /* desktop body + controls */
  --text-base: 1rem;    --text-base-lh: 1.75rem;  /* phone body */
  --text-lg: 1.125rem;  --text-lg-lh: 1.75rem;    /* section titles */
  --text-xl: 1.25rem;   --text-xl-lh: 1.75rem;
  --text-2xl: 1.5rem;   --text-2xl-lh: 2rem;      /* stat values */
  --text-3xl: 1.875rem; --text-3xl-lh: 2.25rem;   /* page titles (display font) */
  --text-4xl: 2.25rem;  --text-4xl-lh: 2.5rem;    /* sign-in title */

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --tracking-tight: -0.02em;

  /* ---- Spacing (4px base, same as Tailwind on landing) ---- */
  --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;

  /* ---- Layout ---- */
  --container: 64rem;       /* lists, Billing, Operator uses --container-wide */
  --container-wide: 80rem;
  --container-narrow: 40rem; /* forms: upload, welcome */
  --gutter: var(--space-4);  /* becomes 24px at >=640, 32px at >=1024 */
  --nav-height: 3.5rem;

  /* ---- Radius ---- */
  --radius-sm: 0.375rem;  /* badges, small buttons */
  --radius-md: 0.5rem;    /* buttons, inputs (landing uses rounded-lg = 8px) */
  --radius-lg: 0.75rem;   /* panels, alerts, drop zones */
  --radius-xl: 1rem;      /* sign-in card, Reader preview */
  --radius-full: 999px;

  /* ---- Shadow (stone-tinted, always paired with a translucent ring, never a solid border) ---- */
  --ring: 0 0 0 1px var(--color-line);
  --shadow-xs: 0 1px 2px rgb(28 25 23 / 0.05);
  --shadow-sm: 0 1px 3px rgb(28 25 23 / 0.06), 0 1px 2px rgb(28 25 23 / 0.04);
  --shadow-lg: 0 12px 32px -8px rgb(28 25 23 / 0.14), 0 2px 6px rgb(28 25 23 / 0.05);

  /* ---- Controls ---- */
  --control-h: 2.25rem;      /* 36px: primary/secondary buttons, inputs */
  --control-h-sm: 1.875rem;  /* 30px: inline actions (Copy, Revoke, Make Editor) */

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration: 150ms;
}

@media (min-width: 40rem) { :root { --gutter: var(--space-6); } }
@media (min-width: 64rem) { :root { --gutter: var(--space-8); } }

/* Phone: controls get bigger (44px touch), body text 16px. */
@media (max-width: 39.99rem) {
  :root {
    --control-h: 2.75rem;
    --control-h-sm: 2.25rem;
  }
}
