/* A person's own stock report, set like a research note: a flat page with a
   masthead, a rated verdict, our own market data, and the AI's sections in
   full. The serif (editorial.css) carries titles and reading text; Plex Sans
   labels it and Plex Mono sets numbers. */
.stock-report {
  width: min(100% - 2rem, 50rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.stock-report__masthead {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* A short brass rule is the one piece of gold; it is metal, not a fill. */
.stock-report__masthead::after {
  content: "";
  display: block;
  width: 2.5rem;
  margin-top: 0.55rem;
  border-top: 2px solid var(--brass);
}

.stock-report__header h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.stock-report__dates {
  margin: 0.6rem 0 1.1rem;
  color: var(--ink-mute);
  font-size: 0.85rem;
}

/* The full disclaimer closes the report; the opening one is a quiet line. */
.stock-report__header + .research-disclaimer,
.stock-report__card .research-disclaimer {
  margin: 0 0 1.5rem;
  padding-top: 0;
  border-top: 0;
  font-size: 0.75rem;
}

/* Verdict: one ruled row, not a boxed card. */
.stock-report__card {
  margin: 1.5rem 0 0;
}

.stock-report__verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding: 1.1rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--brass);
}

.stock-report__rating-label {
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.stock-report__rating {
  margin: 0.1rem 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.stock-report__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 0;
}

.stock-report__facts dt,
.stock-report__stats dt {
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.stock-report__facts dd,
.stock-report__stats dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Colour means direction and nothing else: green for buy and up, amber for sell
   and down. A figure is never coloured by colour alone: the sign or the word stays. */
.stock-report__rating.is-buy { color: var(--accent); }
.stock-report__rating.is-sell { color: var(--alert); }

/* The target is the number a reader looks for; it leads the verdict facts. */
.stock-report .stock-report__target dd {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
}

/* Figures are set in mono; the horizon is words, so it stays in the text face. */
.stock-report__stats dd {
  font-family: var(--mono);
  font-weight: 500;
}

/* The horizon is a sentence, so it is a note under the verdict, not a metric. */
.stock-report__horizon {
  margin: 0.7rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.stock-report__horizon span {
  margin-right: 0.5rem;
  color: var(--ink-mute);
  font-size: 0.8rem;
}

/* The AI caveat and the disclaimer read as one block of fine print. */
.stock-report__caveat {
  margin: 0.9rem 0 0.2rem;
  color: var(--ink-mute);
  font-size: 0.75rem;
}

/* Reading text. */
.stock-report .report-prose {
  max-width: 65ch;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

/* Inside a section: three clear steps, not one heading size. */
.stock-report .report-prose h1,
.stock-report .report-prose h2,
.stock-report .report-prose h3,
.stock-report .report-prose h4 {
  margin: 1.8rem 0 0.5rem;
  color: var(--ink);
  line-height: 1.3;
}

.stock-report .report-prose h1,
.stock-report .report-prose h2 {
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.stock-report .report-prose h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
}

.stock-report .report-prose h4 {
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Tables are ledgers: rules, not boxes; figures right-aligned and even. */
.stock-report .report-prose table {
  width: 100%;
  margin: 1.2rem 0 1.6rem;
  border-collapse: collapse;
  font-family: var(--font);
  font-size: 0.85rem;
  line-height: 1.4;
}

.stock-report .report-prose th,
.stock-report .report-prose td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.stock-report .report-prose th {
  border-bottom: 1.5px solid var(--brass);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.stock-report .report-prose th:first-child,
.stock-report .report-prose td:first-child {
  padding-left: 0;
}

.stock-report .report-prose td {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.stock-report .report-prose td:first-child {
  color: var(--ink);
}

.stock-report .report-prose td.up { color: var(--accent); }
.stock-report .report-prose td.down { color: var(--alert); }

/* Figures line up on their right edge. */
.stock-report .report-prose th.num,
.stock-report .report-prose td.num {
  text-align: right;
  white-space: nowrap;
}

/* No banding: a heavier rule closes the table. */
.stock-report .report-prose tbody tr:last-child td {
  border-bottom-color: var(--ink-mute);
}

.stock-report .report-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.stock-report__summary {
  color: var(--ink);
}

/* Our own data, set apart from the AI's words. */
.stock-report__evidence,
.stock-report__section {
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.stock-report__evidence h2,
.stock-report__section h2 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

/* Page one: the summary beside our own numbers. */
.stock-report__brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem 2.25rem;
  align-items: start;
}

@media (min-width: 46rem) {
  .stock-report__brief:has(.stock-report__glance) {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  }
}

.stock-report .stock-report__thesis {
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.6;
}

.stock-report__glance h2 {
  margin: 0 0 0.6rem;
  padding-top: 0.6rem;
  border-top: 2px solid var(--brass);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}

/* A ledger: label left, figure right, a hairline between rows. */
/* Inside the text, brass is only the quotation bar; dividers stay neutral. */
.stock-report .report-prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
}

.stock-report .report-prose blockquote {
  margin: 1.2rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--brass);
  color: var(--ink);
  font-style: italic;
}

/* The closing disclaimer is the report's last word, set off with a brass rule. */
.stock-report__closing .research-disclaimer {
  border-top: 1px solid var(--brass);
}

/* A short brass rule opens each section, as it does the masthead. */
.stock-report__section > h2::before {
  content: "";
  display: block;
  width: 2rem;
  margin-bottom: 0.6rem;
  border-top: 2px solid var(--brass);
}

/* The plan is the part a reader acts on, so it is set apart. */
.stock-report__section--plan {
  padding-bottom: 0.5rem;
}

/* The plan's numbers lead the callout, ahead of the AI's reasoning. */
.stock-report__levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.1rem;
  padding: 0.9rem 0;
  border-block: 1px solid var(--hairline);
}

.stock-report__levels dt {
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.stock-report__levels dd {
  margin: 0.1rem 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stock-report__section--plan .report-prose p {
  margin: 0.5rem 0;
}

.stock-report__stats {
  margin: 0 0 0.5rem;
  padding: 0;
}

.stock-report__stats > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hairline);
}

.stock-report__stats > div:last-child {
  border-bottom: 1px solid var(--hairline);
}

.stock-report__stats dd {
  text-align: right;
}

.stock-report__range span {
  white-space: nowrap;
}

.stock-report__stats .is-up { color: var(--accent); }
.stock-report__stats .is-down { color: var(--alert); }

.stock-report__stats-note,
.stock-report__legend {
  margin: 0 0 1rem;
  color: var(--ink-mute);
  font-size: 0.78rem;
}

.stock-report__chart {
  position: relative;
  margin: 0.5rem 0 0.6rem;
}

.stock-report__chart-canvas {
  height: 260px;
}

.stock-report__chart-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.85rem;
}

.stock-report__chart-status[hidden] { display: none; }

/* Key ratios: the stats ledger in two columns. */
.stock-report__ratios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  column-gap: 2.5rem;
  border-top: 1px solid var(--hairline);
}

.stock-report__ratios > div,
.stock-report__ratios > div:last-child {
  border-top: 0;
  border-bottom: 1px solid var(--hairline);
}

.stock-report__ratios dd.is-up { color: var(--accent); }
.stock-report__ratios dd.is-down { color: var(--alert); }

.stock-report__snapshot .stock-report__subhead span { margin-left: 0.5rem; }
.stock-report__snapshot .fin-charts { margin-top: 1.4rem; }

/* Contents: a bar that stays under the site bar while the report scrolls, so a
   long report can be jumped through. Green links, brass rules; the section in
   view is marked with a brass underline. */
.stock-report__contents {
  position: sticky;
  top: calc(var(--bar-height) + var(--rail-strip-height));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0.15rem 0;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
}

.stock-report__contents ul {
  display: flex;
  gap: 0.25rem 1.4rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.stock-report__contents ul::-webkit-scrollbar { display: none; }

.stock-report__contents a {
  display: block;
  padding: 0.65rem 0 0.55rem;
  border-bottom: 2px solid transparent;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

.stock-report__contents a:hover,
.stock-report__contents a[aria-current="true"] {
  border-bottom-color: var(--brass);
}

.stock-report__contents a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.stock-report__print {
  flex: none;
  margin-left: auto;
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-mute);
  font: inherit;
  cursor: pointer;
}

.stock-report__print:hover { color: var(--ink); }

/* Clear the site bar and the contents bar when a link jumps to a section. */
.stock-report__section { scroll-margin-top: calc(var(--bar-height) + var(--rail-strip-height) + 3.5rem); }

@media (prefers-reduced-motion: no-preference) {
  html:has(.stock-report__contents) { scroll-behavior: smooth; }
}

/* The contents bar already rules this off. */
.stock-report__contents + .stock-report__section {
  margin-top: 2rem;
  border-top: 0;
  padding-top: 0;
}

.stock-report__note {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--alert);
  background: var(--surface-inset);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.stock-report__next {
  margin-top: 2rem;
}

/* A report being written: a thin brass line and a short list of steps. */
.stock-report__progress {
  margin: 1.5rem 0 2rem;
  padding: 1.4rem 0 1.2rem;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--hairline);
}

.stock-report__progress-title {
  margin: 0 0 1rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.3;
}

.stock-report__bar {
  height: 3px;
  background: var(--hairline);
  overflow: hidden;
}

/* The filled part is a brass line, like every other brass mark: a border, not a fill. */
.stock-report__bar > span {
  display: block;
  width: 0;
  height: 0;
  border-top: 3px solid var(--brass);
}

@media (prefers-reduced-motion: no-preference) {
  .stock-report__bar > span { transition: width 1s linear; }
}

.stock-report__progress-meta {
  margin: 0.6rem 0 1.2rem;
  color: var(--ink-mute);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.stock-report__steps {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stock-report__steps li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.stock-report__steps li::before {
  content: "";
  flex: none;
  width: 0.9rem;
  color: var(--accent);
  text-align: center;
}

.stock-report__steps li.is-done { color: var(--ink-soft); }
.stock-report__steps li.is-done::before { content: "\2713"; }

.stock-report__steps li.is-current { color: var(--ink); font-weight: 600; }
.stock-report__steps li.is-current::before { content: "\2022"; color: var(--brass); }

.stock-report__progress-note {
  margin: 1.2rem 0 0;
  color: var(--ink-mute);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* The service's own account of the report: the rating in words, what to do,
   the summary with its checked figures, the plan, and the appendix. */
.stock-report__meaning {
  max-width: 28rem;
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.stock-report__method,
.stock-report__basis {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-mute);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
}

.stock-report .stock-report__target .stock-report__method {
  color: var(--accent);
  font-weight: 600;
}

.stock-report__actions h2 {
  margin: 0 0 0.6rem;
  padding-top: 0.6rem;
  border-top: 2px solid var(--brass);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.stock-report__actions dl {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.stock-report__actions dt {
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.stock-report__actions dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
}

.stock-report__stale {
  margin: 0 0 1rem;
  padding: 0.55rem 0.8rem;
  border-left: 2px solid var(--brass);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.stock-report__glance:only-child { grid-column: 1 / -1; }

.stock-report__subhead {
  margin: 1.8rem 0 0.6rem;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
}

/* A badge: green text in a thin brass outline. Verified is the strong one. */
.stock-report__badge {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  color: var(--ink-mute);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.stock-report__badge--verified {
  border-color: var(--brass);
  color: var(--accent);
  font-weight: 600;
}

.stock-report__figures,
.stock-report__watch {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stock-report__figures li,
.stock-report__watch li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
}

.stock-report__figures li:last-child,
.stock-report__watch li:last-child { border-bottom: 1px solid var(--hairline); }

.stock-report__figure-label { flex: 1 1 12rem; color: var(--ink); }
.stock-report__figure-period { margin-left: 0.4rem; color: var(--ink-mute); font-size: 0.78rem; }

.stock-report__figure-value {
  color: var(--ink);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.stock-report__watch li > span:first-child { flex: 1 1 14rem; color: var(--ink); }
.stock-report__watch time { color: var(--ink-mute); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

.stock-report__plan-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem 2rem;
  margin: 0 0 0.5rem;
}

.stock-report__plan-facts dt { color: var(--ink-mute); font-size: 0.8rem; }

.stock-report__plan-facts dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.stock-report__return.is-up { color: var(--accent); }
.stock-report__return.is-down { color: var(--alert); }

/* The plan on one price axis: scenarios above, the plan's levels below, today's
   price crossing both. Markers are rings (a line), never filled. */
.plan-visual {
  --row-height: 2.9rem;
  margin: 1.6rem 0 0.5rem;
}

.plan-visual__scroll { overflow-x: auto; }

.plan-visual__canvas {
  position: relative;
  min-width: 34rem;
  padding: 0 0.5rem;
}

.plan-visual__lane {
  position: relative;
  height: calc(var(--rows) * var(--row-height));
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-visual__marker {
  position: absolute;
  left: var(--x);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: var(--row-height);
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.25;
}

.plan-visual__label { color: var(--ink-soft); }
.plan-visual__label strong { color: var(--ink); font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.plan-visual__detail { color: var(--ink-mute); font-size: 0.74rem; }

/* Scenarios hang above the axis: the label at the top, a stem down to a ring on the axis. */
.plan-visual__lane--scenarios .plan-visual__marker { top: calc(var(--row) * var(--row-height)); }

.plan-visual__lane--scenarios .plan-visual__marker::after {
  content: "";
  position: absolute;
  top: 2.4rem;
  left: 50%;
  width: 0;
  height: calc((var(--rows) - var(--row) - 1) * var(--row-height) + 0.5rem);
  border-left: 1px solid var(--hairline-strong);
}

.plan-visual__lane--scenarios .plan-visual__marker::before {
  content: "";
  position: absolute;
  top: calc(2.4rem + (var(--rows) - var(--row) - 1) * var(--row-height) + 0.5rem - 0.35rem);
  left: 50%;
  z-index: 1;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  border: 2px solid var(--ring);
  border-radius: 50%;
  background: var(--bg);
}

/* Levels sit below the axis: a ring on the axis, a stem down, the label under it. */
.plan-visual__lane--levels .plan-visual__marker {
  top: calc(var(--row) * var(--row-height));
  padding-top: 1rem;
}

.plan-visual__lane--levels .plan-visual__marker::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--row) * var(--row-height) - 0.75rem);
  left: 50%;
  width: 0;
  height: calc(var(--row) * var(--row-height) + 0.75rem + 0.9rem);
  border-left: 1px solid var(--hairline-strong);
}

.plan-visual__lane--levels .plan-visual__marker::after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--row) * var(--row-height) - 0.75rem - 0.35rem);
  left: 50%;
  z-index: 1;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  border: 2px solid var(--ring);
  border-radius: 50%;
  background: var(--bg);
}

.plan-visual__axis {
  position: relative;
  height: 0;
  margin: 0.55rem 0 0.75rem;
  border-top: 2px solid var(--ink-mute);
}

.plan-visual__now {
  position: absolute;
  left: var(--x);
  bottom: 0.35rem;
  transform: translateX(-50%);
  padding: 0 0.3rem;
  background: var(--bg);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.plan-visual__now::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  height: 0.9rem;
  border-left: 2px dashed var(--accent);
}

/* The ring on the axis for each marker, coloured by what it is. */
.plan-visual__marker--bear,
.plan-visual__marker--base,
.plan-visual__marker--bull { --ring: var(--ink-mute); }
.plan-visual__marker--base { --ring: var(--ink); }
.plan-visual__marker--entry { --ring: var(--accent); }
.plan-visual__marker--stop { --ring: var(--alert); }
.plan-visual__marker--take_profit { --ring: var(--ink-soft); }
.plan-visual__marker--target { --ring: var(--brass); }
.plan-visual__marker--target .plan-visual__label strong { color: var(--brass); }

.plan-visual figcaption {
  margin: 0.4rem 0 0;
  color: var(--ink-mute);
  font-size: 0.82rem;
}

.plan-visual figcaption strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.plan-visual figcaption .is-up { color: var(--accent); }
.plan-visual figcaption .is-down { color: var(--alert); }

.plan-visual__legend,
.plan-visual__rules {
  display: grid;
  gap: 0.35rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.plan-visual__legend strong,
.plan-visual__rules strong { margin-right: 0.35rem; color: var(--ink); font-weight: 600; }
.plan-visual__legend span { color: var(--ink-mute); }

/* Where the summary and plan end and the analysts' own reasoning begins. */
.stock-report__divider {
  margin: 3rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--brass);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.stock-report__divider + .stock-report__section {
  margin-top: 1.25rem;
  border-top: 0;
  padding-top: 0;
}

/* Saved as a PDF: Letter, a running head and folio, no site chrome. The
   evidence block (heading and chart) is kept whole so it never splits. */
@page {
  size: Letter;
  margin: 17mm 17mm 18mm;

  @top-left {
    content: "GetMarketAlerts Research";
    color: #68736d;
    font: 8pt "IBM Plex Sans", sans-serif;
    border-bottom: 0.5pt solid #b08d57;
    vertical-align: bottom;
    padding-bottom: 3mm;
  }

  @bottom-right {
    content: counter(page) " of " counter(pages);
    color: #666;
    font: 8pt "IBM Plex Sans", sans-serif;
  }
}

/* The masthead already names the report on page one. */
@page :first {
  @top-left { content: none; border-bottom: 0; }
}

@media print {
  html,
  body,
  .site-shell {
    background: #fff !important;
  }

  .site-bar,
  .site-rail,
  .stock-report__progress,
  .stock-report__contents,
  .stock-report__next,
  .page-footer {
    display: none !important;
  }

  /* The app shell insets the page for the nav rail and bar; paper has neither. */
  .site-shell {
    padding: 0 !important;
  }

  .stock-report {
    width: 100%;
    padding: 0;
    font-size: 10.5pt;
  }

  .stock-report__header h1 { font-size: 24pt; }
  .stock-report__rating { font-size: 22pt; }

  .stock-report .report-prose,
  .stock-report .stock-report__thesis {
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* 65ch leaves a wide empty strip on paper; this keeps about 80 characters. */
  .stock-report .report-prose { max-width: 80ch; }

  .stock-report .report-prose p,
  .stock-report .report-prose li {
    orphans: 3;
    widows: 3;
  }

  .stock-report .report-prose h1,
  .stock-report .report-prose h2 { font-size: 13pt; }
  .stock-report .report-prose h3 { font-size: 11.5pt; }
  .stock-report .report-prose h4 { font-size: 10.5pt; }

  .stock-report .report-prose h1,
  .stock-report .report-prose h2,
  .stock-report .report-prose h3,
  .stock-report .report-prose h4 { break-after: avoid; }

  .stock-report .report-prose table { font-size: 9pt; }
  .stock-report__section--plan { break-inside: avoid; }

  .stock-report__evidence h2,
  .stock-report__section h2 {
    font-size: 17pt;
    break-after: avoid;
  }

  .stock-report__evidence,
  .stock-report__section {
    margin-top: 1.2rem;
    padding-top: 0.9rem;
  }

  .stock-report__evidence h2 { margin-bottom: 0.5rem; }
  .stock-report__caveat { margin: 0.5rem 0 1rem; }

  /* Same height as on screen: the chart is drawn once and is not redrawn for print. */
  .stock-report__chart-canvas { height: 260px; }
  .stock-report__evidence,
  .stock-report__chart,
  .stock-report__verdict,
  .stock-report__glance { break-inside: avoid; }

  .stock-report__brief:has(.stock-report__glance) {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  }

  .stock-report__stats dd { font-size: 9pt; }

  /* An introductory line stays with the list it introduces; items do not split. */
  .stock-report .report-prose p:has(+ ul),
  .stock-report .report-prose p:has(+ ol) { break-after: avoid; }
  .stock-report .report-prose li { break-inside: avoid; }
  .stock-report__levels dd { font-size: 14pt; }
  .stock-report__figures li,
  .stock-report__watch li,
  .stock-report__actions,
  .plan-visual,
  .stock-report__snapshot { break-inside: avoid; }
  .stock-report__section table { break-inside: auto; }
  .stock-report__section table.compact { break-inside: avoid; }
  .stock-report__section tr { break-inside: avoid; }
  .stock-report__section thead { display: table-header-group; }
}

/* Recently generated reports on the request page: ticker and time only. */
.reports-recent {
  margin: 1.25rem 0;
}

.reports-recent__title {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.reports-recent ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reports-recent li {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.reports-recent a {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.reports-recent time {
  color: var(--ink-mute);
  white-space: nowrap;
}

/* "1 of 4 analysts done" under the current step of the waiting page. */
.stock-report__step-detail { display: block; margin-top: 2px; font-size: 0.8125rem; font-weight: 400; color: var(--ink-soft); }
.stock-report__step-detail[hidden] { display: none; }
