/* Fonts are declared inline by app/common/shell.py so their URLs are the
   fingerprinted ones the page preloads. Licences are listed in the README. */

/* ─── Design tokens ────────────────────────────────────────────────────────── */

:root {
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Surfaces and ink */
  --bg: #faf8f2;
  --surface: #ffffff;
  --ink: #101a15;
  --ink-2: #36423c;
  --muted: #5f6b64;
  --line: #e3e1d6;
  --line-strong: #cfcdc0;

  /* Zacks greens */
  --brand: #124734;
  --brand-deep: #0c3626;
  --accent: #1b6b3c;
  --gain: #15803d;
  --tint: #e6f0e4;
  --tint-strong: #d3e5d0;

  /* Free-report CTA. White text on this orange is 4.2:1, so the label is set
     large and bold (≥ 19px/700) to meet the AA large-text threshold. */
  --cta: #d94e0a;
  --cta-hover: #c04408;

  /* Supporting colors */
  --navy: #1e2b4f;
  --loss: #b42318;
  --amber-text: #b4500b;
  --amber-line: #dd6b1f;
  --notice-bg: #fbf3dc;
  --notice-ink: #6b4e00;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(16 26 21 / 5%), 0 4px 12px -6px rgb(16 26 21 / 12%);
  --shadow: 0 1px 2px rgb(16 26 21 / 4%), 0 18px 40px -18px rgb(16 26 21 / 22%);

  --container: 1120px;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
}

/* ─── Reset ────────────────────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  /* Plus Jakarta Sans ships a narrow space glyph; open the words up a touch. */
  word-spacing: 0.07em;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

/* ─── Layout primitives ────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(560px + 2 * var(--gutter));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Type ─────────────────────────────────────────────────────────────────── */

.display {
  font-family: var(--font-serif);
  word-spacing: normal;
  font-weight: 500;
  font-size: clamp(2.25rem, 1.25rem + 4.4vw, 3.75rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.display--sm {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.5rem);
  line-height: 1.08;
}

.display__accent {
  color: var(--accent);
}

.display__accent--bearish {
  color: var(--loss);
}

/* Premium: calmer weight, the product name in italic brand green. */
.display--premium {
  font-weight: 400;
}

.display--premium em {
  color: var(--brand);
  font-weight: 500;
  white-space: nowrap;
}

/* First sentence on its own line where it fits. */
.display__line {
  display: block;
}

.eyebrow {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow::after {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: var(--accent);
}

.lede {
  max-width: 34em;
  margin-top: 1rem;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (max-width: 560px) {
  .eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
  }
}
