/* Compare page (compare.js). Shares the stock chart's look (chart.css): ink lines, greys,
   highlighter for the day you're reading. Stocks are told apart by line style, not color. */
.cmp { display: block; padding-bottom: 96px; }
.cmp section { border-top: 5px solid var(--ink); padding: 18px 0 40px; }
.cmp h2 { margin: 0 0 8px; font-size: 32px; line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.cmp .sub { margin: 0 0 14px; color: var(--quiet); font-size: 16px; max-width: 64ch; }
.cmp-pick { border-top: 0 !important; padding-top: 0 !important; }

.cmp-chips { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cmp-chips li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--ink); padding: 8px 10px 8px 12px; font-size: 15px; }
.cmp-chips a { text-decoration: none; }
.cmp-chips a:hover { text-decoration: underline; }
.cmp-chips button, .cmp-sug { appearance: none; border: 0; background: none; padding: 2px 4px; font: 600 13px/1 var(--sans); color: var(--quiet); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cmp-chips button:hover, .cmp-sug:hover { color: var(--ink); }
.cmp-sw { display: inline-block; vertical-align: middle; flex: none; margin-right: 6px; }

.cmp-add { position: relative; max-width: 480px; }
.cmp-add input { width: 100%; font: 400 17px/1.4 var(--sans); padding: 12px 14px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
.cmp-add input:focus { outline: 3px solid var(--cite); outline-offset: -1px; }
.cmp-opts { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 0; padding: 0; list-style: none; background: var(--paper); border: 1px solid var(--ink); border-top: 0; max-height: 340px; overflow-y: auto; }
.cmp-opts li { padding: 10px 14px; font-size: 15px; cursor: pointer; border-top: 1px solid var(--rail); }
.cmp-opts li span { color: var(--quiet); font-size: 13px; margin-left: 6px; }
.cmp-opts li[aria-selected="true"], .cmp-opts li:hover { background: var(--hl); }
.cmp-opts li.none { color: var(--quiet); cursor: default; background: none; }
.cmp-hint { margin: 12px 0 0; font-size: 15px; color: var(--quiet); }

.cmp-svg { cursor: crosshair; }
.cmp-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.cmp-end { fill: var(--ink); font: 600 12px var(--sans); font-variant-numeric: tabular-nums; }
.cmp-read span { display: inline-flex; align-items: center; }
.cmp-read .cmp-sw { margin-right: 4px; }

.cmp-table { overflow-x: auto; margin: 0 0 10px; border-top: 2px solid var(--ink); }
.cmp-table table { border-collapse: collapse; width: 100%; min-width: 520px; font-variant-numeric: tabular-nums; }
.cmp-table th, .cmp-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rail); text-align: right; font-size: 15px; vertical-align: top; }
.cmp-table thead th { text-align: right; font-size: 16px; font-weight: 800; border-bottom: 1px solid var(--ink); }
.cmp-table thead th a { text-decoration: none; }
.cmp-table th[scope="row"], .cmp-table thead th:first-child { text-align: left; font-weight: 600; color: var(--quiet); }
.cmp-fy { display: block; font-size: 12.5px; font-weight: 400; color: var(--quiet); }
.cmp-note { font-size: 14px; color: var(--quiet); margin: 8px 0 24px; max-width: 70ch; }

.cmp-chart { margin: 0 0 28px; }
.cmp-chart h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.cmp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.cmp-cell { border-top: 2px solid var(--ink); padding-top: 8px; }
.cmp-who { margin: 0 0 6px; font-weight: 800; font-size: 14px; display: flex; align-items: center; }
.cmp-bars { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; height: 90px; align-items: stretch; }
.cmp-bars li { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.cmp-bars .bar { --p: calc(100% - 16px); position: absolute; left: 16%; right: 16%;
  bottom: calc(16px + var(--p) * var(--z) / 100); height: max(1px, calc(var(--p) * var(--h) / 100)); background: var(--ink); }
.cmp-bars .bar.neg { bottom: calc(16px + var(--p) * (var(--z) - var(--h)) / 100);
  background: repeating-linear-gradient(45deg, var(--ink) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--ink); }
.cmp-bars .y { font-size: 11px; color: var(--quiet); text-align: center; }
.cmp-latest { margin: 6px 0 0; font-size: 13px; color: var(--quiet); }
.cmp-latest b { color: var(--ink); }
.cmp-none { font-size: 14px; color: var(--quiet); margin: 0; }

.cmp-sources { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); font-size: 15px; }
.cmp-sources li { padding: 10px 0; border-bottom: 1px solid var(--rail); }
.cmp-sources li:target { background: var(--wash); box-shadow: inset 4px 0 0 var(--cite); padding-left: 10px; }
.cmp-sources .n { color: var(--cite); font-weight: 800; margin-right: 8px; }
.cmp-sources a { color: var(--cite); }
.cmp-sources .plain { color: var(--quiet); }


@media (max-width: 640px) {
  .cmp h2 { font-size: 26px; }
  .cmp-chips li { font-size: 14px; }
  .cmp-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) { .cmp-end { font-size: 11px; } }
