/* /companies and /companies/{symbol} on the site's Metronic tokens (--tw-*), so the pages follow pogosov.com in both
   themes.  Up/down use the same green/red as /analyst-ratings; the direction is also shown by ▲/▼ and the sign. */
body > .flex.grow, body > .flex.grow > .wrapper { min-width: 0; }

.co-page {
  --co-ink: var(--tw-gray-900); --co-ink-2: var(--tw-gray-700); --co-muted: var(--tw-gray-600); --co-line: var(--tw-gray-200);
  --co-soft: var(--tw-gray-100); --co-accent: var(--tw-primary); --co-band: rgba(27, 132, 255, .07);
  --co-up: #15803d; --co-down: #be123c; --co-warn: #a16207; --co-warn-bg: rgba(202, 138, 4, .14);
  --co-accent-bg: rgba(27, 132, 255, .10);
  padding-bottom: 40px;
}
.dark .co-page {
  --co-up: #4ade80; --co-down: #f87171; --co-warn: #facc15; --co-warn-bg: rgba(250, 204, 21, .12);
  --co-band: rgba(96, 165, 250, .09); --co-accent-bg: rgba(96, 165, 250, .14);
}
.co-page .card { background: var(--tw-card-background-color); border: var(--tw-card-border); border-radius: .75rem; box-shadow: var(--tw-card-box-shadow); }
.co-page h2 { font-size: 18px; font-weight: 650; color: var(--co-ink); margin: 0 0 6px; }
.co-page h3 { font-size: 15px; font-weight: 650; color: var(--co-ink); margin: 14px 0 6px; }
.co-page p, .co-page li { color: var(--co-ink-2); font-size: 14px; line-height: 1.55; }
.co-muted, .co-page .co-muted { color: var(--co-muted); font-size: 13px; }
.co-up { color: var(--co-up); }
.co-down { color: var(--co-down); }

.co-head { margin: 8px 0 16px; }
.co-eyebrow { font-size: 11px; letter-spacing: .08em; color: var(--co-muted); font-weight: 600; margin-bottom: 4px; }
.co-eyebrow a { color: var(--co-muted); }
.co-eyebrow a:hover { color: var(--co-accent); }
.co-head h1 { font-size: 24px; font-weight: 700; color: var(--co-ink); margin-bottom: 8px; line-height: 1.25; }
.co-lead { max-width: 900px; font-size: 15px !important; }
.co-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.co-chip-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; min-width: 150px; border-radius: .75rem;
  background: var(--tw-card-background-color); border: var(--tw-card-border); }
.co-chip-stat span { font-size: 12px; color: var(--co-muted); line-height: 1.35; }
.co-chip-stat b { font-size: 20px; color: var(--co-ink); font-weight: 700; line-height: 1.2; }
.co-chip-stat small { font-size: 12px; color: var(--co-muted); line-height: 1.35; }

.co-card { margin-bottom: 16px; }
.co-card .card-body { padding: 18px 20px; }
.co-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; }
.co-list { padding-left: 20px; margin: 6px 0 0; }
.co-list li { margin-bottom: 6px; }
ol.co-list { list-style: decimal; }
ul.co-list { list-style: disc; }

.co-bars { list-style: none; padding: 0; margin: 4px 0 8px; }
.co-bars li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 28px; align-items: center; gap: 10px; margin: 5px 0; font-size: 13px; }
.co-bars span { color: var(--co-ink-2); }
.co-bars i { display: block; height: 10px; width: var(--w); min-width: 4px; border-radius: 0 4px 4px 0; background: var(--co-accent); }
.co-bars b { text-align: right; color: var(--co-ink); font-variant-numeric: tabular-nums; }

/* cumulative chart */
.co-chart { position: relative; margin-top: 8px; }
.co-cum { width: 100%; height: auto; display: block; touch-action: pan-y; }
.co-cum--narrow { display: none; }
.co-grid { stroke: var(--co-line); stroke-width: 1; }
.co-grid.co-zero, .co-zero { stroke: var(--tw-gray-400); stroke-width: 1; }
.co-tick { stroke: var(--tw-gray-400); }
.co-axis { fill: var(--co-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.co-axis--s { font-size: 10px; }
.co-line { fill: none; stroke: var(--co-accent); stroke-width: 2; stroke-linejoin: round; }
.co-mk { stroke: var(--tw-card-background-color); stroke-width: 2; paint-order: stroke; cursor: pointer; }
.co-mk--up { fill: var(--co-up); }
.co-mk--down { fill: var(--co-down); }
.co-mk-link:focus-visible .co-mk { stroke: var(--co-ink); }
.co-cross { stroke: var(--tw-gray-500); stroke-width: 1; stroke-dasharray: 3 3; }
.co-off { display: none; }
.co-dot { fill: var(--co-accent); stroke: var(--tw-card-background-color); stroke-width: 2; }
.co-tip { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; max-width: 280px; padding: 8px 10px; border-radius: 8px;
  background: var(--tw-card-background-color); border: var(--tw-card-border); box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
  font-size: 12.5px; color: var(--co-ink-2); line-height: 1.4; }
.co-tip b { color: var(--co-ink); }

/* forward checks */
.co-fw-lead { max-width: 980px; }
.co-fw { margin: 12px 0 6px; border-top: 1px solid var(--co-line); }
.co-fw-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(96px, .55fr) minmax(96px, .55fr) minmax(0, 2.6fr);
  gap: 8px 18px; padding: 12px 0; border-bottom: 1px solid var(--co-line); align-items: start; }
.co-fw-head { padding: 8px 0; font-size: 12px; font-weight: 600; color: var(--co-muted); }
.co-fw-rule b { color: var(--co-ink); font-size: 14px; }
.co-page .co-fw-rule p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.co-fw-cell { display: flex; flex-direction: column; gap: 1px; }
.co-fw-cell b { font-size: 20px; line-height: 1.2; color: var(--co-ink); font-variant-numeric: tabular-nums; }
.co-fw-cell small { font-size: 12px; line-height: 1.35; color: var(--co-muted); font-variant-numeric: tabular-nums; }
.co-fw-y { display: none; font-size: 12px; color: var(--co-muted); }
.co-page .co-fw-verdict p { margin: 0; font-size: 13.5px; }
.co-fw-verdict small { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--co-muted); }

/* cases */
.co-cases-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 12px; }
.co-cases-head h2 { margin: 0; }
.co-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.co-fchip { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--co-ink-2);
  border: 1px solid var(--co-line); background: transparent; cursor: pointer; }
.co-fchip:hover { color: var(--co-ink); border-color: var(--tw-gray-300); }
.co-fchip.is-on { color: var(--co-accent); border-color: var(--co-accent); background: var(--co-accent-bg); }
.co-ep { margin-bottom: 14px; scroll-margin-top: 80px; }
.co-ep:target { box-shadow: 0 0 0 2px var(--co-accent); }
.co-ep .card-body { padding: 16px 20px; }
.co-ep-head h3 { margin: 0 0 8px; font-size: 17px; }
.co-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.co-badge { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--co-ink-2); background: var(--co-soft); }
.co-badge--early { color: var(--co-accent); background: var(--co-accent-bg); }
.co-badge--lead { color: var(--co-ink); background: var(--co-soft); border: 1px solid var(--co-line); }
.co-badge--warn { color: var(--co-warn); background: var(--co-warn-bg); }
.co-cause { margin: 0 0 12px; max-width: 980px; }
.co-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px 18px; margin-bottom: 12px; }
.co-day { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: .6rem; background: var(--co-soft); }
.co-day-num { display: flex; flex-direction: column; gap: 2px; }
.co-day-num b { color: var(--co-ink); font-size: 13.5px; }
.co-move { font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; }
.co-day-num small { font-size: 12px; color: var(--co-muted); font-variant-numeric: tabular-nums; }
.co-spark { width: 100%; max-width: 360px; height: auto; display: block; }
.co-band { fill: var(--co-band); }
.co-sline { fill: none; stroke: var(--co-accent); stroke-width: 1.6; stroke-linejoin: round; }
.co-sgap { fill: none; stroke: var(--tw-gray-400); stroke-width: 1.2; stroke-dasharray: 2 3; }
.co-sdot { fill: var(--co-accent); }
.co-slabel { fill: var(--co-ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }

.co-tl { list-style: none; padding: 0; margin: 0 0 10px; border-left: 2px solid var(--co-line); }
.co-tl-item { display: grid; grid-template-columns: 112px 110px 120px minmax(0, 1fr); gap: 4px 12px; align-items: baseline;
  padding: 5px 0 5px 14px; position: relative; font-size: 13.5px; }
.co-tl-item::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--tw-card-background-color); border: 2px solid var(--tw-gray-400); }
.co-tl--first::before { background: var(--co-accent); border-color: var(--co-accent); }
.co-tl--news::before { border-color: var(--co-ink-2); }
.co-tl-item time { color: var(--co-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-kind { font-size: 12px; color: var(--co-muted); }
.co-tl--first .co-kind { color: var(--co-accent); font-weight: 600; }
.co-src { font-size: 12.5px; color: var(--co-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-text { color: var(--co-ink); }
.co-tl--context .co-text { color: var(--co-ink-2); }
.co-text a { color: inherit; text-decoration: underline; text-decoration-color: var(--co-line); text-underline-offset: 3px; }
.co-text a:hover { color: var(--co-accent); text-decoration-color: var(--co-accent); }
.co-lesson { margin: 0; font-size: 13.5px; }

/* company list */
.co-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.co-company { display: block; color: inherit; transition: box-shadow .15s; }
.co-company:hover { box-shadow: 0 0 0 2px var(--co-accent); }
.co-company .card-body { padding: 18px 20px; }
.co-company h2 { margin-bottom: 2px; }
.co-mini { list-style: none; padding: 0; margin: 10px 0 0; }
.co-mini li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--co-line); font-size: 13.5px; }
.co-mini b { color: var(--co-ink); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .co-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1024px) and (max-width: 1300px) {
  body:not(.sidebar-collapse) .co-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .co-head h1 { font-size: 20px; }
  .co-chip-stat { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); padding: 8px 12px; }
  .co-chip-stat:first-child { flex-basis: 100%; }
  .co-chip-stat b { font-size: 18px; }
  .co-cum--wide { display: none; }
  .co-cum--narrow { display: block; }
  /* one scrolling row of filter chips instead of five wrapped rows */
  .co-filter { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .co-filter::-webkit-scrollbar { display: none; }
  .co-fchip { flex: none; white-space: nowrap; }
  .co-card .card-body, .co-ep .card-body { padding: 14px; }
  .co-days { grid-template-columns: minmax(0, 1fr); }
  .co-tl-item { grid-template-columns: auto auto minmax(0, 1fr); }
  .co-tl-item .co-text { grid-column: 1 / -1; }
  .co-bars li { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 24px; }
  .co-fw-head { display: none; }
  .co-fw-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .co-fw-rule, .co-fw-verdict { grid-column: 1 / -1; }
  .co-fw-y { display: block; }
}

/* storylines: /companies/stories and /companies/stories/{id} */
.st-link { margin-bottom: 16px; }
.st-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.st-filter a { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--co-ink-2);
  border: 1px solid var(--co-line); }
.st-filter a:hover { color: var(--co-ink); border-color: var(--tw-gray-300); }
.st-filter a.is-on { color: var(--co-accent); border-color: var(--co-accent); background: var(--co-accent-bg); }
.st-table { border-top: 1px solid var(--co-line); }
.st-row { display: grid; grid-template-columns: 64px minmax(0, 3fr) 104px minmax(0, 1.3fr) minmax(0, 2.2fr); gap: 6px 16px;
  padding: 11px 0; border-bottom: 1px solid var(--co-line); align-items: start; }
.st-headrow { padding: 8px 0; font-size: 12px; font-weight: 600; color: var(--co-muted); }
.st-ticker { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--co-accent); background: var(--co-accent-bg); }
.st-ticker:hover { color: var(--co-ink); }
.st-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-title { color: var(--co-ink); font-weight: 600; font-size: 14px; line-height: 1.4; }
.st-title:hover { color: var(--co-accent); }
.st-next { font-size: 13px; color: var(--co-ink-2); line-height: 1.45; }
.st-next b { color: var(--co-ink); font-weight: 600; }
.st-p { display: flex; flex-direction: column; gap: 4px; }
.st-p b { font-size: 17px; color: var(--co-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.st-pbar { display: block; height: 6px; width: 100%; border-radius: 3px; background: var(--co-soft); position: relative; overflow: hidden; }
.st-pbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--co-accent); border-radius: 3px; }
.st-if { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.st-if small, .st-last small { font-size: 12px; color: var(--co-muted); line-height: 1.4; }
.st-dir { font-weight: 600; white-space: nowrap; }
.st-dir--up { color: var(--co-up); }
.st-dir--down { color: var(--co-down); }
.st-dir--unclear { color: var(--co-muted); }
.st-last { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--co-ink-2); line-height: 1.45; min-width: 0; }
.st-last span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-more { margin-top: 10px; }
.st-check { border-top: 1px solid var(--co-line); margin: 10px 0; max-width: 820px; }
.st-check-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--co-line); font-size: 14px; color: var(--co-ink); font-variant-numeric: tabular-nums; }
.st-check-row.st-headrow { font-size: 12px; color: var(--co-muted); }
.st-check-row.st-total { font-weight: 600; }
.st-note { max-width: 900px; font-size: 13.5px !important; }
.st-chip-wide { flex: 1 1 360px; max-width: 640px; }
.st-chip-text { font-size: 15px !important; line-height: 1.4 !important; font-weight: 600 !important; }
.st-bars { display: flex; gap: 3px; align-items: stretch; overflow-x: auto; padding-bottom: 2px; }
.st-bar { flex: 1 0 22px; max-width: 42px; display: flex; flex-direction: column; align-items: stretch; }
.st-bar-up, .st-bar-down { height: 56px; display: flex; }
.st-bar-up { align-items: flex-end; border-bottom: 1px solid var(--tw-gray-400); }
.st-bar-down { align-items: flex-start; }
.st-bar i { display: block; width: 100%; min-height: 1px; border-radius: 2px; }
.st-bar-up i { background: var(--co-up); opacity: .45; }
.st-bar-down i { background: var(--co-down); opacity: .45; }
.st-bar.is-event i { opacity: 1; }
.st-bar small { font-size: 10px; color: var(--co-muted); text-align: center; margin-top: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-chrono, .st-built { list-style: none; padding: 0; margin: 8px 0 0; }
.st-chrono li, .st-built li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 14px; padding: 9px 0;
  border-bottom: 1px solid var(--co-line); }
.st-chrono time, .st-built time { font-size: 13px; color: var(--co-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-page p.st-first, .co-page p.st-first { margin: 0; color: var(--co-ink); font-size: 14px; }
.co-page p.st-also { margin: 3px 0 0; font-size: 13px; color: var(--co-ink-2); }
.st-pub { display: inline-block; min-width: 42px; margin-right: 8px; font-size: 11px; font-weight: 600; color: var(--co-muted); }
.st-at { margin-right: 8px; font-size: 12px; color: var(--co-muted); font-variant-numeric: tabular-nums; }
.st-chrono a { color: inherit; text-decoration: underline; text-decoration-color: var(--co-line); text-underline-offset: 3px; }
.st-chrono a:hover { color: var(--co-accent); text-decoration-color: var(--co-accent); }
.st-assess { border-top: 1px solid var(--co-line); margin-top: 8px; }
.st-a { border-bottom: 1px solid var(--co-line); }
.st-a > summary { display: grid; grid-template-columns: 52px 46px 36px 20px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 9px 0; cursor: pointer; list-style: none; font-size: 13.5px; }
.st-a > summary::-webkit-details-marker { display: none; }
.st-a > summary time { color: var(--co-ink-2); font-variant-numeric: tabular-nums; }
.st-a > summary b { color: var(--co-ink); font-variant-numeric: tabular-nums; }
.st-a > summary small { font-size: 12px; font-variant-numeric: tabular-nums; }
.st-a-next { color: var(--co-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-a[open] .st-a-next { white-space: normal; }
.st-a-body { padding: 0 0 12px 62px; }
.st-a-body p { margin: 0 0 6px; }
.st-prompt { margin-top: 6px; }
.st-prompt summary { cursor: pointer; font-size: 12.5px; color: var(--co-muted); }
.st-prompt summary:hover { color: var(--co-accent); }
.st-prompt pre { margin: 6px 0 0; padding: 10px 12px; max-height: 360px; overflow: auto; border-radius: 8px; background: var(--co-soft);
  color: var(--co-ink-2); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.st-built p { margin: 0; font-size: 13.5px; }
@media (max-width: 760px) {
  .st-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .st-filter::-webkit-scrollbar { display: none; }
  .st-filter a { flex: none; }
  .st-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .st-row.st-headrow { display: none; }
  .st-main { grid-column: 2 / -1; }
  .st-p { grid-column: 1 / 2; min-width: 72px; }
  .st-if { grid-column: 2 / -1; }
  .st-last { grid-column: 1 / -1; }
  .st-check-row { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; }
  .st-chrono li, .st-built li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .st-a > summary { grid-template-columns: 46px 40px 30px 16px minmax(0, 1fr); gap: 4px 6px; }
  .st-a-next { grid-column: 1 / -1; }
  .st-a-body { padding-left: 0; }
}
