/* The Fershman Journal — design tokens, fonts and base reset.
   Shared by the public site, the admin panel and the member portal. */

/* Newsreader (variable: weight 200–800, optical size 6–72) — SIL Open Font License */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/newsreader-latin-opsz-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;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/newsreader-latin-ext-opsz-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;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations"),
       url("/assets/fonts/newsreader-latin-opsz-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;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-ext-opsz-italic.woff2") format("woff2-variations"),
       url("/assets/fonts/newsreader-latin-ext-opsz-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;
}
/* Schibsted Grotesk (variable: weight 400–900) — SIL Open Font License */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/schibsted-grotesk-latin-wght-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;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/schibsted-grotesk-latin-ext-wght-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;
}

/* Cinzel (variable: weight 400–900) — inscriptional capitals in the spirit of Trajan, used for the
   nameplate and initials — SIL Open Font License */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cinzel-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/cinzel-latin-wght-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;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cinzel-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/cinzel-latin-ext-wght-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;
}
/* Hedvig Letters Serif (400) — headlines — SIL Open Font License */
@font-face {
  font-family: "Hedvig Letters Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/hedvig-letters-serif-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;
}
@font-face {
  font-family: "Hedvig Letters Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/hedvig-letters-serif-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;
}

:root {
  color-scheme: light;
  /* Paper & ink */
  --paper: #ffffff;
  --paper-2: #f3f4f1;
  --paper-3: #e7e9e4;
  --ink: #000000;
  --text: #1c1e1d;
  --muted: #5a5f5c;
  --faint: #8b908c;
  --rule: #dadcd7;
  /* Fershman ledger green */
  --accent: #0a5c44;
  --accent-hover: #07432f;
  --accent-soft: #e3eee8;
  --accent-ink: #ffffff;
  /* After-hours band (Big Read, footer) */
  --night: #0c1814;
  --night-2: #15251e;
  --night-text: #eef2ef;
  --night-muted: #a3b0aa;
  --night-rule: #2a3b33;
  /* Market colors — data only */
  --up: #0b7a4c;
  --down: #b3332a;
  --warn: #9a6200;
  --warn-soft: #fbf1dc;
  --danger: #b3332a;
  --danger-soft: #f9e6e4;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  /* House style: Trajan-style capitals (Cinzel, the open-source cousin of Trajan Pro) for the
     nameplate and initials, Hedvig Letters Serif for headlines. To use a licensed Trajan Pro web
     font (e.g. from Adobe Fonts), load it on the page and put its name first here. */
  --display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --headline: "Hedvig Letters Serif", "Newsreader", Georgia, serif;
  --caps: 0.12em;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-meta: 0.8125rem;
  --fs-small: 0.875rem;
  --fs-ui: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-article: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);

  --maxw: 1280px;
  --gutter: clamp(16px, 2.6vw, 32px);
  --gap: clamp(20px, 2.4vw, 36px);
  --radius: 0px;
  --radius-ui: 2px;
  --shadow-pop: 0 18px 40px -18px rgba(5, 25, 18, 0.35), 0 2px 6px rgba(5, 25, 18, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1211;
    --paper-2: #171b19;
    --paper-3: #222826;
    --ink: #f4f6f3;
    --text: #dde2de;
    --muted: #9ca39f;
    --faint: #6e7672;
    --rule: #2b312e;
    --accent: #62c9a1;
    --accent-hover: #86d9b8;
    --accent-soft: #163028;
    --accent-ink: #04140e;
    --night: #070d0b;
    --night-2: #101a16;
    --night-rule: #24332c;
    --up: #46c08a;
    --down: #ef7a6f;
    --warn: #e5b45a;
    --warn-soft: #2e2512;
    --danger: #ef7a6f;
    --danger-soft: #331b18;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1211;
  --paper-2: #171b19;
  --paper-3: #222826;
  --ink: #f4f6f3;
  --text: #dde2de;
  --muted: #9ca39f;
  --faint: #6e7672;
  --rule: #2b312e;
  --accent: #62c9a1;
  --accent-hover: #86d9b8;
  --accent-soft: #163028;
  --accent-ink: #04140e;
  --night: #070d0b;
  --night-2: #101a16;
  --night-rule: #24332c;
  --up: #46c08a;
  --down: #ef7a6f;
  --warn: #e5b45a;
  --warn-soft: #2e2512;
  --danger: #ef7a6f;
  --danger-soft: #331b18;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-synthesis-weight: none; /* never fake a bold Hedvig */
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 1000;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font: 600 var(--fs-small)/1 var(--sans); text-decoration: none; border-radius: var(--radius-ui);
}
.skip-link:focus { top: 12px; }

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