/* Company Research Dossier. Keep its content styled while hidden so it can print. */
body[data-story-kind="stock"] {
  --dossier-blue: #2457a6;
  --dossier-quarter: #176a63;
  --dossier-up: #287547;
  --dossier-down: #af3e48;
  --dossier-ink: var(--text-color);
  --dossier-muted: var(--text-secondary);
  --dossier-line: var(--border-color);
  --stock-nav-gap: 10px;
  --stock-nav-top: calc(var(--view-switch-top) + var(--stock-switch-height, 0px) + var(--stock-nav-gap));
}

body[data-story-kind="stock"].dark-mode {
  --dossier-blue: #9ec1ff;
  --dossier-quarter: #7fd3c7;
  --dossier-up: #8ddd9d;
  --dossier-down: #ffa4aa;
}

body[data-story-kind="stock"]:has(#dossier-view:not([hidden])) .magazine-container {
  max-width: 1500px;
  padding: 40px 20px 90px;
}

body[data-story-kind="stock"]:has(#dossier-view:not([hidden])) .magazine-container > :is(.navigation-links, .article-header, .finn-cta-block.is-top, .view-switch) {
  max-width: 660px;
  margin-inline: auto;
}

body[data-story-kind="stock"]:has(#dossier-view:not([hidden])) .view-switch {
  background: var(--bg-color);
  box-shadow: 0 0 0 100vmax var(--bg-color);
  clip-path: inset(calc(-1 * var(--view-switch-top)) -100vmax calc(-1 * var(--stock-nav-gap)));
}

.stock-dossier-nav {
  position: sticky;
  top: var(--stock-nav-top);
  z-index: 35;
  display: flex;
  gap: 2px;
  width: 100%;
  margin: 20px 0 8px;
  padding: 6px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--dossier-line);
  background: var(--bg-color);
  scrollbar-width: thin;
}

.stock-dossier-nav a {
  display: block;
  flex: none;
  padding: 9px 13px;
  border-radius: 5px;
  color: var(--dossier-muted);
  font: 600 .79rem/1.2 "Georgia", "Times New Roman", serif;
  text-decoration: none;
}

.stock-dossier-nav a:hover,
.stock-dossier-nav a:focus-visible {
  color: var(--dossier-blue);
  background: color-mix(in srgb, var(--dossier-blue) 9%, var(--bg-color));
}

.stock-dossier-all-sections {
  margin: 0 0 12px;
  color: var(--dossier-muted);
  font-size: .8rem;
}

.stock-dossier-all-sections summary {
  width: fit-content;
  cursor: pointer;
}

.stock-dossier-all-sections .toc-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px 22px;
  padding: 15px 0 8px;
  border: 0;
  background: var(--bg-color);
}

.stock-dossier-all-sections ul { list-style: none; margin: 0; padding: 0; }
.stock-dossier-all-sections .toc-group { max-width: 240px; }
.stock-dossier-all-sections .toc-group-title {
  margin-bottom: 5px;
  color: var(--dossier-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.stock-dossier-all-sections .toc-group li { margin: 3px 0; }
.stock-dossier-all-sections a { color: var(--dossier-ink); text-decoration: none; }
.stock-dossier-all-sections a:hover { color: var(--dossier-blue); text-decoration: underline; }

body[data-story-kind="stock"] .article-content.full-article-content {
  width: 100%;
  margin: 0;
}

body[data-story-kind="stock"] .stock-dossier > section {
  padding: 17px 0 20px;
}

body[data-story-kind="stock"]:has(#dossier-view:not([hidden])) .stock-dossier [id] {
  scroll-margin-top: calc(var(--stock-nav-top) + var(--stock-nav-height, 0px) + 10px);
}

body[data-story-kind="stock"] .stock-dossier > section + section {
  border-top: 1px solid var(--dossier-line);
}

body[data-story-kind="stock"] .stock-dossier > section > h2 {
  max-width: none;
  margin: 0 0 10px;
  color: var(--dossier-ink);
  font: 700 clamp(1.35rem, 2vw, 1.75rem)/1.2 "Georgia", "Times New Roman", serif;
  letter-spacing: -.025em;
}

body[data-story-kind="stock"] .stock-dossier :is(p, li) { text-align: left; }

body[data-story-kind="stock"] .stock-dossier .theme-table,
body[data-story-kind="stock"] .stock-dossier .theme-chart {
  width: 100%;
  max-width: none;
  margin: 14px 0 22px;
  padding: 18px 20px 14px;
  border: 1px solid var(--dossier-line);
  border-radius: 10px;
  background: var(--bg-color);
  box-shadow: 0 3px 12px rgb(26 48 77 / 3%);
}

body[data-story-kind="stock"] .stock-dossier .theme-scorecard-title,
body[data-story-kind="stock"] .stock-dossier .theme-chart-title {
  margin: 0 0 13px;
  color: var(--dossier-ink);
  font: 700 1.03rem/1.3 "Georgia", "Times New Roman", serif;
  letter-spacing: -.015em;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll {
  width: 100%;
  border: 1px solid var(--dossier-line);
  border-radius: 5px;
  scrollbar-color: var(--dossier-muted) transparent;
  scrollbar-width: thin;
}

body[data-story-kind="stock"] .article-content .stock-dossier .theme-table-scroll table {
  width: 100%;
  max-width: none;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--dossier-ink);
  font: 500 .79rem/1.4 "Georgia", "Times New Roman", serif;
  font-variant-numeric: tabular-nums;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll :is(th, td) {
  padding: 6px 5px !important;
  border-bottom: 1px solid var(--dossier-line);
  vertical-align: middle;
}

body[data-story-kind="stock"] .stock-dossier #table-profit-and-loss :is(th, td):nth-last-child(-n+3) {
  padding-inline: 3px !important;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--dossier-muted);
  background: var(--bg-secondary);
  font: 700 .69rem/1.3 "Georgia", "Times New Roman", serif;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: normal;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll thead th.num {
  text-align: right;
}

body[data-story-kind="stock"] .stock-dossier #table-compounded-growth table :is(th, td):nth-child(n+2) {
  box-shadow: inset 1px 0 var(--dossier-line);
}

body[data-story-kind="stock"] .stock-dossier #table-results-and-consensus thead th {
  min-width: 0;
  max-width: 9rem;
}

body[data-story-kind="stock"] .stock-dossier #table-results-and-consensus .theme-table-scroll[aria-label="By layer"] tbody th[scope="row"] {
  min-width: 5rem;
}

body[data-story-kind="stock"] .stock-dossier .theme-spark-cell svg {
  width: 64px;
  height: auto;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll thead th:first-child {
  z-index: 3;
  background: var(--bg-secondary);
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll tbody th[scope="row"] {
  min-width: 7rem;
  color: var(--dossier-ink);
  background: var(--bg-color);
  font: 650 .79rem/1.3 "Georgia", "Times New Roman", serif;
  text-transform: none;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll table.stock-statement tbody th[scope="row"] {
  max-width: 10rem;
  white-space: normal;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll tbody tr:nth-child(even) > :is(th, td) {
  background: color-mix(in srgb, var(--dossier-blue) 3%, var(--bg-color));
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll tbody tr:hover > :is(th, td) {
  background: color-mix(in srgb, var(--dossier-blue) 8%, var(--bg-color));
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll tbody tr:last-child > :is(th, td) {
  border-bottom: none;
}

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll td.period-annual { color: var(--dossier-blue); }
body[data-story-kind="stock"] .stock-dossier .theme-table-scroll td.period-quarter { color: var(--dossier-quarter); }
body[data-story-kind="stock"] .stock-dossier .theme-table-scroll td.change-up { color: var(--dossier-up); font-weight: 700; }
body[data-story-kind="stock"] .stock-dossier .theme-table-scroll td.change-down { color: var(--dossier-down); font-weight: 700; }
body[data-story-kind="stock"] .stock-dossier .theme-table-scroll td.gap { color: var(--dossier-muted); }

body[data-story-kind="stock"] .stock-dossier .theme-table-scroll a {
  color: var(--dossier-blue);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--dossier-blue) 45%, transparent);
}

body[data-story-kind="stock"] .stock-dossier .theme-table-notes {
  max-width: 95ch;
  margin: 12px 0 0;
  color: var(--dossier-muted);
  font: 400 .72rem/1.5 "Georgia", "Times New Roman", serif;
}

body[data-story-kind="stock"] .stock-dossier .theme-chart-line { stroke: var(--dossier-blue); }
body[data-story-kind="stock"] .stock-dossier .theme-chart-line.is-guide { stroke: var(--dossier-muted); }
body[data-story-kind="stock"] .stock-dossier .theme-spark { color: var(--dossier-blue); cursor: crosshair; }
body[data-story-kind="stock"] .stock-dossier #table-quarters .theme-spark { color: var(--dossier-quarter); }
body[data-story-kind="stock"] .stock-dossier .theme-spark circle { fill: currentColor; }

body[data-story-kind="stock"] .stock-dossier .stock-active-point {
  fill: var(--bg-color);
  stroke: var(--dossier-blue);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

body[data-story-kind="stock"] .stock-dossier #table-quarters .stock-active-point { stroke: var(--dossier-quarter); }

.stock-chart-tooltip {
  position: fixed;
  z-index: 90;
  max-width: min(260px, calc(100vw - 20px));
  padding: 8px 10px;
  border: 1px solid var(--dossier-line);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--dossier-ink);
  box-shadow: 0 8px 25px rgb(15 30 50 / 15%);
  font: 600 .75rem/1.45 "Georgia", "Times New Roman", serif;
  white-space: pre-line;
  pointer-events: none;
}

body[data-story-kind="stock"] .stock-dossier .theme-chart-lines:focus-visible,
body[data-story-kind="stock"] .stock-dossier .theme-spark:focus-visible {
  outline: 2px solid var(--dossier-blue);
  outline-offset: 3px;
}

body[data-story-kind="stock"] .stock-dossier .back-to-top-link { margin: 8px 0 0; padding: 0; }
body[data-story-kind="stock"] .stock-dossier .back-to-top-link a { font: 600 .72rem "Georgia", "Times New Roman", serif; color: var(--dossier-muted); }

@media (max-width: 768px) {
  body[data-story-kind="stock"]:has(#dossier-view:not([hidden])) .magazine-container { padding: 20px 15px 60px; }
  body[data-story-kind="stock"]:has(#dossier-view:not([hidden])) .magazine-container > :is(.navigation-links, .article-header, .finn-cta-block.is-top, .view-switch) { max-width: 670px; }
}

@media (max-width: 720px) {
  .stock-dossier-nav { margin-top: 15px; }
  body[data-story-kind="stock"] .stock-dossier .theme-table,
  body[data-story-kind="stock"] .stock-dossier .theme-chart { padding: 14px 12px; }
  body[data-story-kind="stock"] .stock-dossier #table-compounded-growth .theme-table-scroll :is(th, td) { padding-inline: 3px !important; }
  body[data-story-kind="stock"] .stock-dossier #table-compounded-growth thead th { font-size: .62rem; letter-spacing: 0; }
}
@media print {
  body.export-stock-pdf[data-story-kind="stock"] {
    --dossier-blue: #2457a6;
    --dossier-quarter: #176a63;
    --dossier-up: #287547;
    --dossier-down: #af3e48;
  }

  body.export-stock-pdf #dossier-view .stock-dossier .theme-table-scroll thead th {
    position: static;
  }
}
