/* The Insights pages: reports, studies and guides. Layout and type come from home.css and company.css. */
.ins-hub {
  padding-bottom: 0;
}
.ins-hub .doc-head {
  border-bottom: 0;
  padding-bottom: 0;
}
.ins-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 32px;
}
.ins-head p {
  max-width: 52ch;
  margin: 0;
  color: var(--ink-300);
}
.ins-head a {
  color: var(--blue-300);
}
.ins-head a:hover {
  color: var(--white);
}

/* ---------- state of a page ---------- */
.state {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--orange);
  border-radius: 99px;
  font: 600 11px/1.5 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
  vertical-align: middle;
}
.doc-head .notice {
  margin-top: 24px;
}

/* ---------- tables ---------- */
.scroll {
  overflow-x: auto;
}
.rank {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.rank caption {
  padding-bottom: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--ink-400);
}
.rank th,
.rank td {
  padding: 12px 16px 12px 0;
  border-top: 1px solid var(--ink-800);
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}
.rank thead th {
  border-top: 0;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.rank tbody th {
  color: var(--white);
}
.rank tbody th b {
  margin: 0 8px;
  font-weight: 700;
}
.rank tbody th span:not(.plogo, .state) {
  color: var(--ink-400);
}
.rank tbody th .plogo,
.tickers .plogo {
  position: relative;
  vertical-align: middle;
  overflow: hidden;
}
/* Price and valuation of a stock: a second line under its name, in line with the ticker. */
.rank .val {
  display: block;
  margin: 6px 0 0 32px;
  font: 12px/1.4 var(--mono);
  color: var(--ink-400);
  /* It may wrap, so it never pushes the other columns out of the table. */
  white-space: normal;
}
.rank .val span {
  white-space: nowrap;
}
.rank .val b {
  margin: 0;
  font-weight: 400;
  color: var(--ink-200);
}
.rank .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 14px;
}
.rank td:last-child,
.rank th:last-child {
  padding-right: 0;
}
.rank td code,
.rank th code {
  color: var(--white);
}
.pos {
  color: var(--green-300);
}
.neg {
  color: var(--red-300);
}
.trend {
  display: inline-block;
  min-width: 84px;
  color: var(--ink-300);
}
.trend.rising {
  color: var(--green-300);
}
.trend.falling {
  color: var(--red-300);
}
.spark {
  vertical-align: middle;
  fill: none;
  stroke: var(--blue-300);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doc-head h1 .plogo {
  vertical-align: middle;
}
.rank tbody th a:hover b {
  text-decoration: underline;
}
.ins-list tbody th a {
  font-weight: 600;
  border-bottom: 1px solid var(--ink-600);
}
.ins-list tbody th a:hover {
  border-color: var(--white);
}
.tickers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tickers b {
  margin-right: 10px;
  font-weight: 600;
  color: var(--white);
}

/* ---------- cards of studies and guides ---------- */
.ins-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ins-card {
  display: block;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
  color: var(--ink-300);
  transition:
    border-color var(--dur),
    transform var(--dur) var(--ease);
}
.ins-card:hover {
  border-color: var(--blue-300);
  transform: translateY(-2px);
}
.ins-card .meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-400);
}
.ins-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--white);
}
.ins-card p:last-child {
  margin: 0;
  font-size: 15px;
}

/* ---------- the method of the reports ---------- */
.ins-method {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px 48px;
  margin: 0;
}
.ins-method div {
  padding-top: 16px;
  border-top: 1px solid var(--ink-600);
}
.ins-method dt {
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--white);
}
.ins-method dd {
  margin: 0;
  color: var(--ink-300);
}

/* ---------- the short version at the top of a page ---------- */
.ins-sum {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px 48px;
  margin-top: 32px;
  padding: 28px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.ins-sum h2 {
  margin: 0 0 12px;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.ins-sum ul {
  margin: 0;
  padding-left: 18px;
}
.ins-sum li + li {
  margin-top: 8px;
}
.ins-sum li::marker {
  color: var(--orange);
}
.ins-sum b {
  color: var(--white);
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  align-content: start;
  margin: 0;
}
.facts dt {
  font-size: 13px;
  color: var(--ink-400);
}
.facts dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

/* ---------- the text column ---------- */
.prose.wide {
  max-width: none;
}
.prose.wide :is(p, ul, ol, h2, h3) {
  max-width: 68ch;
}
.prose.wide h3 {
  margin-top: 40px;
}
.prose.wide :is(.scroll, .chart, .swarm, pre, .calls, .qa) {
  margin: 24px 0;
}
.prose .qa h3 {
  max-width: none;
  margin: 0;
}
.prose pre {
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  background: var(--ink-900);
}
.prose :not(pre) > code {
  color: var(--white);
}
.calls {
  max-width: none !important;
  padding: 0 !important;
  list-style: none;
}
.calls li {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--ink-800);
}
.calls code {
  overflow-wrap: anywhere;
}
.calls span {
  font-size: 14px;
  color: var(--ink-400);
}
.next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-600);
}
.next a {
  color: var(--blue-300);
}
.next a:hover {
  color: var(--white);
}

/* ---------- a small price chart per stock ---------- */
.prices-cap {
  max-width: none !important;
  font-size: 13px;
  color: var(--ink-400);
}
.prices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.price {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  background: var(--ink-900);
}
.price figcaption {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.price figcaption b {
  color: var(--white);
}
.price figcaption span {
  font-family: var(--mono);
}
.price svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 6px;
}
.price path {
  fill: none;
  stroke: var(--ink-300);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.price circle {
  fill: var(--ink-300);
}
.price path.pos {
  stroke: var(--green-300);
}
.price path.neg {
  stroke: var(--red-300);
}
.price circle.pos {
  fill: var(--green-300);
}
.price circle.neg {
  fill: var(--red-300);
}
.price .vol rect {
  fill: var(--ink-600);
}
.price p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font: 11px/1.3 var(--mono);
  color: var(--ink-400);
}
.price p span:last-child {
  text-align: right;
}

/* ---------- charts ---------- */
.chart {
  padding: 20px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.chart svg,
.swarm {
  display: block;
  width: 100%;
  height: auto;
}
.chart .grid,
.swarm .grid {
  stroke: var(--ink-700);
  stroke-width: 1;
}
.chart .tick,
.swarm .tick {
  fill: var(--ink-400);
  font: 11px var(--mono);
}
.chart .ref {
  stroke: var(--ink-400);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.chart path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The points of the second plot (a price under a score). */
.chart circle {
  fill: var(--orange);
}
.chart circle.s0 {
  fill: var(--blue-300);
}
/* A series differs in colour and in its dashes, so the lines can be told apart without colour. */
.chart path.s0 {
  stroke: var(--blue-300);
}
.chart path.s1 {
  stroke: var(--orange);
  stroke-dasharray: 8 4;
}
.chart path.s2 {
  stroke: var(--red-300);
  stroke-dasharray: 2 5;
}
.chart path.s3 {
  stroke: var(--white);
  stroke-dasharray: 12 4 2 4;
}
.chart path.s4 {
  stroke: var(--green-300);
  stroke-dasharray: 1 4;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-200);
  max-width: none !important;
}
.legend li::before {
  content: '';
  display: inline-block;
  width: 18px;
  margin-right: 8px;
  border-top: 2px solid var(--blue-300);
  vertical-align: middle;
}
.legend .s1::before {
  border-top: 2px dashed var(--orange);
}
.legend .s2::before {
  border-top: 2px dotted var(--red-300);
}
.legend .s3::before {
  border-top: 2px dashed var(--white);
}
.legend .s4::before {
  border-top: 2px dotted var(--green-300);
}
.chart figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-400);
}
.chart-data {
  margin-top: 12px;
  font-size: 13px;
}
.chart-data summary {
  cursor: pointer;
  color: var(--blue-300);
}
.chart-data table {
  margin-top: 12px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.chart-data :is(th, td) {
  padding: 4px 20px 4px 0;
  text-align: left;
  font-weight: 400;
}
.chart-data .num {
  text-align: right;
  font-family: var(--mono);
}
.swarm circle {
  fill: var(--ink-400);
}
.swarm circle.pos {
  fill: var(--green-300);
}
.swarm circle.neg {
  fill: var(--red-300);
}

@media (max-width: 760px) {
  .ins-sum {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .ins-cards {
    grid-template-columns: 1fr;
  }
}
/* A chart is drawn 720 units wide. On a phone that is a third of it, so the labels grow. */
@media (max-width: 560px) {
  .chart .tick,
  .swarm .tick {
    font-size: 22px;
  }
}

/* ---------- the page of one stock (apps/web/src/site-stock.ts) ---------- */

.facts.glance {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px 32px;
  padding: 28px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
/* On a phone two columns, so the grid is not a list of twelve rows. */
@media (max-width: 600px) {
  .facts.glance {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
    padding: 20px;
  }
}
.prose.wide p + .facts.glance {
  margin-top: 20px;
}
.facts small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-400);
}
.src-cards {
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.src-card {
  padding: 20px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.src-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prose.wide .src-card h3 {
  margin: 0;
  font-size: 17px;
}
.lean {
  padding: 2px 10px;
  border: 1px solid var(--ink-600);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-200);
}
.lean.pos {
  border-color: var(--green);
  color: var(--green-300);
}
.lean.neg {
  border-color: var(--red);
  color: var(--red-300);
}
.src-nums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.src-nums dt {
  font-size: 12px;
  color: var(--ink-400);
}
.src-nums dd {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
/* A source's mentions split into bullish, neutral and bearish; the note below says it in words. */
.split {
  display: flex;
  gap: 2px;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
}
.split i {
  min-width: 2px;
}
.split .pos {
  background: var(--green-300);
}
.split .neu {
  background: var(--ink-600);
}
.split .neg {
  background: var(--red-300);
}
.prose.wide .src-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-400);
}
/* One bar per row on the scale from 0 to 100%: the analysts' buy share, each source's bullish share. */
.prose.wide .bars {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.bars li {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr 48px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.bars i {
  height: 8px;
  border-radius: 4px;
  background: var(--ink-800);
}
.bars u {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 4px;
  background: var(--blue-300);
}
.bars li:first-child u {
  background: var(--white);
}
.bars b {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.prose.wide .split + .bars {
  margin-top: 28px;
}
#analysts .split {
  max-width: 480px;
  margin-top: 20px;
}
.prose.wide .nearby {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.prose.wide .nearby a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-sm);
  background: var(--ink-900);
  font-size: 14px;
  text-decoration: none;
}
/* The tiles are a grid: the space between list items of the text does not apply. */
.prose .nearby li + li {
  margin-top: 0;
}
.nearby a:hover {
  border-color: var(--ink-400);
}
.nearby span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-300);
}
.prose.wide .src-top {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--ink-800);
}
.prose.wide .src-top p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-200);
  overflow-wrap: anywhere;
}
.src-top footer {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-400);
}
.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}
.prose.wide a.tile {
  text-decoration: none;
}
.tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 84px;
  height: 56px;
  padding: 0 10px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-sm);
  background: var(--ink-850);
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}
.tile.m {
  width: 112px;
  height: 72px;
}
.tile.l {
  width: 156px;
  height: 96px;
  font-size: 16px;
}
.tile b {
  color: var(--white);
}
.tile span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-300);
}
.tile.pos {
  border-color: #16a34a66;
  background: #16a34a2e;
}
.tile.neg {
  border-color: #e3000466;
  background: #e300042e;
}
a.tile:hover {
  border-color: var(--white);
}
.tile[aria-current] {
  outline: 2px solid var(--blue-300);
  outline-offset: 1px;
}

/* ---------- data pages: rankings, market sentiment, search (apps/web/src/site-pages.ts) ---------- */

.data .muted {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-400);
}
.data .lead a {
  text-decoration: underline;
  text-decoration-color: var(--ink-600);
  text-underline-offset: 3px;
}
.data .lead a:hover {
  text-decoration-color: currentColor;
}
.data-body {
  padding-top: 32px;
}
.data-body > .notice {
  max-width: 720px;
}
/* The status page: the state of the API and of each source. */
.data .health.ok {
  color: var(--green-300);
}
.data .health.degraded {
  color: var(--orange);
}
.data .health.down {
  color: var(--red-300);
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.pills + nav .pills,
nav + nav > .pills {
  margin-top: 12px;
}
.pills a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--ink-700);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-200);
}
.pills a:hover {
  border-color: var(--ink-400);
  color: var(--white);
}
.pills a[aria-current] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}
.data .sym {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--white);
}
.data .sym a {
  border-bottom: 1px solid var(--ink-600);
}
.data .sym a:hover {
  border-color: var(--white);
}
.data .rank .name {
  min-width: 160px;
  white-space: normal;
  color: var(--ink-200);
}
.data .lsp-disclaimer {
  max-width: 720px;
  margin-top: 48px;
  font-size: 13px;
  color: var(--ink-400);
}
.data .search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 24px;
}
.data .search .grow {
  flex: 1 1 240px;
  max-width: 480px;
}
.data .search label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-400);
}
.data .search input,
.data .search select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: var(--white);
  font: inherit;
}
.data .search :is(input, select):focus-visible,
.pills a:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 2px;
}
.data .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.data .card {
  padding: 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.data .card h2 {
  font-size: 18px;
}
.gauge {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 16px auto 0;
}
.gauge path {
  fill: none;
  stroke-width: 16;
}
.gauge .s0 {
  stroke: var(--red-300);
}
.gauge .s1 {
  stroke: var(--orange);
}
.gauge .s2 {
  stroke: var(--ink-400);
}
.gauge .s3 {
  stroke: var(--green-300);
  opacity: 0.55;
}
.gauge .s4 {
  stroke: var(--green-300);
}
.gauge line {
  stroke: var(--white);
  stroke-width: 4;
  stroke-linecap: round;
}
.gauge circle {
  fill: var(--white);
}
.reading {
  margin: 4px 0 20px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-300);
}
.reading strong {
  display: block;
  font-size: 32px;
  line-height: 1.2;
  color: var(--white);
}
.data .reading .muted {
  font-size: inherit;
}
.figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  margin: 0 0 16px;
}
.figures dt {
  font-size: 13px;
  color: var(--ink-400);
}
.figures dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.data .card table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.data .card caption {
  padding-bottom: 8px;
  text-align: left;
}
.data .card :is(th, td) {
  padding: 6px 12px 6px 0;
  border-top: 1px solid var(--ink-800);
  text-align: left;
  font-weight: 400;
}
.data .card thead th {
  border-top: 0;
  font-size: 12px;
  color: var(--ink-400);
}
.data .card .num {
  padding-right: 0;
  text-align: right;
}
.data .card td .muted {
  margin: 0;
}
.bar {
  display: block;
  height: 6px;
  min-width: 2px;
  margin-bottom: 4px;
  border-radius: 2px;
  background: var(--blue-300);
}
/* A ranking: the table, and beside it the sectors and countries of its rows. */
.rank-grid {
  display: grid;
  gap: 40px;
}
.rank-side {
  display: grid;
  gap: 16px;
}
.rank-side > .muted {
  margin: 0;
}
@media (min-width: 640px) {
  .rank-side {
    grid-template-columns: 1fr 1fr;
  }
  .rank-side > .muted {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1100px) {
  .rank-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  .rank-side {
    position: sticky;
    top: 88px;
    grid-template-columns: 1fr;
  }
}
.shares {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.shares li {
  display: grid;
  grid-template-columns: 1fr auto 40px;
  gap: 6px 12px;
  align-items: baseline;
}
.shares li .muted {
  margin: 0;
}
.shares b {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.shares .bar {
  grid-column: 1 / -1;
  margin: 0;
}
/* The bullish share from the left in green, the bearish share from the right in red. */
.mix {
  display: inline-block;
  width: 48px;
  height: 6px;
  margin-right: 10px;
  border-radius: 3px;
  vertical-align: middle;
  background: linear-gradient(
    to right,
    var(--green-300) 0 var(--up),
    var(--ink-700) var(--up) calc(100% - var(--down)),
    var(--red-300) calc(100% - var(--down)) 100%
  );
}
.data .rank .spark {
  margin-left: 4px;
}
/* The stock takes the width the figures leave, and a long name ends in an ellipsis. */
.rank.top tbody th {
  width: 100%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.read .cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.read {
  margin-top: 72px;
}
.read > h2 {
  margin-bottom: 24px;
}
.read .card h3 {
  font-size: 16px;
}
.read .card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-300);
}
.read .qa {
  max-width: 760px;
}
/* The filter of the table at /stocks needs the script (nav.js), so it shows only with it. */
.data .filter {
  display: none;
}
.js .data .filter {
  display: flex;
}
.data .filter output {
  display: block;
  min-height: 20px;
}
/* On a phone the table keeps the stock and two figures; the name takes a line of its own. */
@media (max-width: 600px) {
  .data .opt,
  .data .mix {
    display: none;
  }
  .data .rank :is(th, td) {
    padding-right: 10px;
  }
  .data .rank .name {
    min-width: 0;
  }
  .rank.top tbody th span:not(.plogo) {
    display: block;
    margin: 2px 0 0 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
  }
}

/* ---------- the page of one stock: the chart of 30 days, the small pictures, the lists ---------- */

/* Bars in a chart: the volume of a day, and its sentiment up or down from the zero line. */
.chart rect.vol {
  fill: var(--ink-600);
}
.chart rect.pos {
  fill: var(--green-300);
}
.chart rect.neg {
  fill: var(--red-300);
}
.chart rect.neu {
  fill: var(--ink-400);
}
.prose.wide .chart + p {
  margin-top: 20px;
}
.prose.wide .notice {
  margin-top: 20px;
  font-size: 15px;
}
.prose.wide .notice strong {
  font-size: 16px;
}
/* The short version: a small picture under a figure. */
.ins-sum dd > :is(.spark, .mix) {
  display: block;
  margin: 8px 0 0;
}
.ins-sum dd > .mix {
  width: 88px;
}
/* The mentions of the week by source: one segment each, the largest first. */
.srcbar {
  display: flex;
  gap: 2px;
  max-width: 160px;
  margin-top: 8px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
}
.srcbar i {
  min-width: 2px;
  background: var(--blue-300);
}
.srcbar i:nth-child(2) {
  background: var(--orange);
}
.srcbar i:nth-child(3) {
  background: var(--white);
}
.srcbar i:nth-child(4) {
  background: var(--ink-400);
}
.srcbar i:nth-child(n + 5) {
  background: var(--ink-600);
}
/* The last close and the analysts' average target as two marks on one scale. */
.range {
  position: relative;
  max-width: 468px;
  height: 4px;
  margin: 28px 6px 0;
  border-radius: 2px;
  background: var(--ink-700);
}
.range :is(i, b) {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
}
.range i {
  border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
}
.range b {
  background: var(--blue-300);
  transform: translate(-50%, -50%) rotate(45deg);
}
.prose.wide .range-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  max-width: none;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-300);
}
.range-key > span > :is(i, b) {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
}
.range-key > span > i {
  border-radius: 50%;
  background: var(--white);
}
.range-key > span > b {
  background: var(--blue-300);
  transform: rotate(45deg);
}
/* A list of stocks with the sentiment score of each. */
.prose.wide .nearby.scored a {
  grid-template-columns: 64px 1fr auto;
}
.nearby.scored i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.nearby.scored i.neu {
  color: var(--ink-300);
}
.more-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 24px;
  margin-top: 24px;
}
.prose.wide .more-cols h3 {
  margin-top: 0;
}
.prose.wide .more-cols .nearby {
  grid-template-columns: 1fr;
  margin-top: 12px;
}
.prose.wide .more-cols p {
  margin: 12px 0 0;
  font-size: 14px;
}

/* ---------- the fear and greed index (apps/web/src/site-index.ts) ---------- */

.fg-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 32px;
}
.fg-side,
.fg-gap {
  padding: 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.fg-hero h2 {
  margin: 0 0 12px;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.fg-dial {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}
.fg-dial path {
  fill: none;
  stroke-width: 14;
  stroke-linecap: butt;
}
.fg-dial .b0 {
  stroke: var(--red-300);
}
.fg-dial .b1 {
  stroke: var(--orange);
}
.fg-dial .b2 {
  stroke: var(--ink-400);
}
.fg-dial .b3 {
  stroke: var(--green-300);
}
.fg-dial .b4 {
  stroke: var(--green);
}
.fg-dial line {
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
}
.fg-dial circle {
  fill: var(--white);
}
/* The needle stands at its value; with motion allowed it turns there from the left end. */
.fg-dial .needle {
  transform: rotate(var(--to));
  transform-origin: 100px 100px;
}
.fg-read {
  margin: 12px 0 0;
  text-align: center;
  color: var(--ink-200);
}
.fg-read strong {
  display: block;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
}
.fg-src {
  margin: 6px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-400);
}
.fg-gap .fg-src,
.fg-gap .fg-num {
  text-align: left;
}
.fg-num {
  margin: 0;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.fg-num.pos,
.fg-then .pos {
  color: var(--green-300);
}
.fg-num.neg,
.fg-then .neg {
  color: var(--red-300);
}
.fg-lead {
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}
.fg-then {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--ink-800);
  list-style: none;
  font-size: 13px;
  color: var(--ink-300);
}
.fg-then li {
  display: grid;
  grid-template-columns: 56px 40px 1fr;
  gap: 8px;
}
.fg-then b {
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
/* The days one side leads, behind the two lines. */
.chart rect.lead {
  opacity: 0.14;
}
.chart rect.lead.pos {
  fill: var(--green-300);
}
.chart rect.lead.neg {
  fill: var(--red-300);
}
.chart circle.s1 {
  fill: var(--orange);
}
/* A bar with a line of words under it: an indicator and what it measures. */
.bars.noted li {
  grid-template-areas: 'name bar value' 'note note note';
  row-gap: 4px;
}
.bars.noted small {
  grid-area: note;
  font-size: 13px;
  color: var(--ink-400);
}
.prose.wide .bars.noted {
  gap: 18px;
}
.prose.wide .bars.noted u {
  background: var(--blue-300);
}

/* ---------- motion: charts and dials come in when the page loads ---------- */

@media (prefers-reduced-motion: no-preference) {
  .fg-dial .needle {
    animation: fg-sweep 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes fg-sweep {
    from {
      transform: rotate(-90deg);
    }
  }
  .fg-read strong,
  .fg-num {
    animation: fg-rise 0.7s var(--ease) 0.5s both;
  }
  @keyframes fg-rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
  /* A line is uncovered from the left. */
  .chart .draw {
    animation: chart-draw 1.3s cubic-bezier(0.3, 0.6, 0.2, 1) both;
  }
  @keyframes chart-draw {
    from {
      clip-path: inset(0 100% 0 0);
    }
    to {
      clip-path: inset(0 0 0 0);
    }
  }
  /* Bars rise from the base line, one after the other. */
  .chart .grow rect {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: chart-grow 0.5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 18ms);
  }
  @keyframes chart-grow {
    from {
      transform: scaleY(0);
    }
  }
  .chart .fade rect {
    animation: chart-fade 0.5s ease-out both;
    animation-delay: calc(0.4s + var(--i, 0) * 18ms);
  }
  @keyframes chart-fade {
    from {
      opacity: 0;
    }
  }
  /* The newest point breathes, so the eye finds today. */
  .chart circle.now {
    transform-box: fill-box;
    transform-origin: center;
    animation: chart-now 2.4s ease-in-out 1.4s infinite;
  }
  @keyframes chart-now {
    50% {
      transform: scale(1.9);
      opacity: 0.55;
    }
  }
  .bars u,
  .srcbar i {
    transform-origin: left center;
    animation: bar-grow 0.9s var(--ease) both;
  }
  @keyframes bar-grow {
    from {
      transform: scaleX(0);
    }
  }
  .chart rect:hover,
  .chart circle:hover {
    filter: brightness(1.5);
  }
}

/* ---------- the fear and greed index: the parts under the dials ---------- */

.doc-head .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
/* The names of the five bands run around the dial; the one the needle is in is lit. */
.fg-dial .rim {
  stroke: none;
}
.fg-dial text {
  fill: var(--ink-400);
  /* Small enough for the narrowest band, the ten points of "Neutral". */
  font: 600 5.4px var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.fg-dial text.on {
  fill: var(--white);
}
.fg-mini {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
}
.fg-mini line {
  stroke: var(--ink-700);
  stroke-dasharray: 3 4;
}
.fg-mini path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fg-mini .s0 {
  stroke: var(--blue-300);
}
.fg-mini .s1 {
  stroke: var(--orange);
}
.fg-page {
  margin-top: 8px;
}
.prose.wide .fg-say {
  max-width: none;
  margin: 24px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
  color: var(--ink-200);
}
.fg-page > section {
  margin-top: 72px;
}
.fg-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin-top: 24px;
}
/* The chart takes the wider part next to the numbers. */
@media (min-width: 1000px) {
  .fg-two.wide {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}
.prose.wide .fg-two h3 {
  margin-top: 0;
}
.prose.wide .fg-two .rank {
  font-size: 14px;
}
.fg-rows {
  display: grid;
  margin: 16px 0 0;
}
.fg-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--ink-800);
  font-size: 14px;
}
.fg-rows dt {
  color: var(--ink-300);
}
.fg-rows dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.fg-rows small {
  margin-left: 8px;
  font-weight: 400;
  color: var(--ink-400);
}
/* Today in four cells. */
.fg-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-700);
}
.fg-strip > div {
  padding: 20px;
  background: var(--ink-900);
}
.prose.wide .fg-strip p {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  font-size: 14px;
  color: var(--ink-200);
}
.fg-strip b {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.fg-strip i,
.fg-card .bars i {
  display: block;
  height: 6px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--ink-800);
}
.fg-strip u {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--blue-300);
}
.fg-strip small {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-400);
}
/* Four short points on the left, four small pictures with a sentence on the right. */
.fg-points {
  display: grid;
  gap: 0;
  margin: 0;
}
.fg-points > div {
  padding: 16px 0;
  border-top: 1px solid var(--ink-800);
}
.fg-points dt {
  font-weight: 600;
  color: var(--white);
}
.fg-points dd {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-300);
}
.prose.wide .fg-notes {
  display: grid;
  gap: 0;
  max-width: none;
  margin: 0;
  padding: 8px 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
  list-style: none;
}
.prose .fg-notes li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: center;
  margin: 0;
  padding: 18px 0;
  font-size: 15px;
  color: var(--ink-200);
}
.prose .fg-notes li + li {
  border-top: 1px solid var(--ink-800);
}
.fg-notes svg {
  width: 64px;
  height: 32px;
  fill: none;
  stroke: var(--ink-400);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fg-notes svg .hot {
  stroke: var(--orange);
}
.fg-notes svg circle.hot {
  fill: var(--orange);
  stroke: none;
}
.fg-notes svg .dash {
  stroke-dasharray: 3 4;
}
/* How the two sides are built: a band of its own. */
.fg-panel {
  padding: 40px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-xl);
  background: var(--ink-850);
}
.prose.wide .fg-panel > h2 {
  margin-top: 0;
}
.fg-card {
  padding: 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.prose.wide .fg-card .bars {
  margin-top: 16px;
}
.prose.wide .fg-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: none;
  margin: 24px 0 0;
  padding: 16px;
  border: 1px dashed var(--ink-600);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ink-400);
}
.fg-box b {
  font-size: 32px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.fg-box em {
  font-style: normal;
  color: var(--ink-200);
}
.prose.wide .fg-card > p:last-child {
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--ink-300);
}
.prose.wide .fg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.prose .fg-chips li {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--ink-700);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-200);
}
.fg-chips b {
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
/* The gap as two tracks: both readings on the scale, then the gap between the three readings. */
.fg-scale {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
}
.prose.wide .fg-scale h3 {
  margin: 0;
}
.fg-track {
  position: relative;
  height: 4px;
  margin: 56px 8px 0;
  border-radius: 2px;
  background: var(--ink-700);
}
.fg-track .span {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--ink-400);
}
.fg-track .zone {
  position: absolute;
  top: -4px;
  height: 12px;
  border-radius: 3px;
  background: var(--ink-600);
}
.fg-track b {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
}
.fg-track b.crowd {
  background: var(--orange);
}
.fg-track b.market {
  background: var(--blue-300);
}
.fg-track b.gap.pos {
  background: var(--green-300);
}
.fg-track b.gap.neg {
  background: var(--red-300);
}
.fg-track b span {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}
/* Two labels close together: the market's stands above the crowd's. */
.fg-track b.market span {
  bottom: 36px;
}
.prose.wide .fg-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-400);
}
.prose.wide .fg-scale .fg-two p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-300);
}
.fg-scale .fg-two b {
  color: var(--white);
}
/* The data behind the index: one card per place to see or read it. */
.fg-data {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 24px;
}
.prose.wide a.fg-link {
  display: block;
  padding: 20px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  background: var(--ink-900);
  text-decoration: none;
}
.prose.wide a.fg-link:hover {
  border-color: var(--ink-400);
}
.prose.wide .fg-link .fg-chips {
  margin: 0 0 16px;
}
.prose.wide .fg-link h3 {
  margin: 0;
  font-size: 16px;
}
.prose.wide .fg-link p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-300);
}
@media (max-width: 600px) {
  .fg-panel {
    padding: 20px;
  }
  .fg-track b span {
    font-size: 11px;
  }
}
