/* Calendar, deals, filings, insiders, leadership, investing and advisers pages
   (otr_biz/sections/{calendar,deals,filings,insiders,leadership,investing,advisers}.py; shared parts in filings.py).
   Shared tokens and classes come from biz.css; only what these pages add is here. */

/* ---------- the dated line under the page head ---------- */
.sd-asof p { margin: -20px 0 36px; font-size: 15px; line-height: 1.45; color: var(--quiet); max-width: 86ch; }
.sd-asof b { color: var(--ink); font-weight: 800; }
.sd-asof.is-stale p { border-left: 5px solid var(--ink); padding: 2px 0 2px 14px; }
.pg.has-rail > main .sd-asof p { margin-top: -16px; }

/* ---------- facts row: four across, two on phones (On the record's .tally) ---------- */
.sd-facts .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sd-facts { padding-bottom: 40px; }

/* ---------- dated one-line feed (On the record's .events / .hm-lines) ---------- */
.sd-feed > li { padding: 12px 0; }
.sd-feed .sd-t { display: block; font-size: 17px; line-height: 1.35; }
.sd-feed .sd-t a { font-weight: 800; }
.sd-feed .sd-t b { font-weight: 800; font-variant-numeric: tabular-nums; }
.sd-feed .x { margin-top: 3px; }
.sd-feed .x a { font-weight: 600; }
.sd-feed a.cite, .tbl a.cite, .sd-rank a.cite, .src-line a { color: var(--cite); font-weight: 400; text-decoration: none; }
.sd-feed a.cite:hover, .tbl a.cite:hover, .sd-rank a.cite:hover { text-decoration: underline; }
.sd-feed .lg { width: 20px; height: 20px; vertical-align: -5px; }
.sd-feed .lg img { width: 16px; height: 16px; }
.feed .when { white-space: nowrap; }

/* ---------- ranked previews ---------- */
.sd-rank li { grid-template-columns: 28px minmax(0, 1fr) auto; }
.sd-rank .sd-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sd-rank .sd-n a { font-weight: 600; }
.sd-rank .v { font-weight: 800; }
.sd-rank .x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-rank .x a { font-weight: 400; }
.sd-rank .bar { margin-top: 6px; }
.sd-see { margin: 14px 0 0; font-size: 15px; }

/* two previews side by side; each keeps its own 5px rule */
.sd-pair { gap: 0 56px; }
.sd-pair > div { min-width: 0; }
.sd-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.sd-three > div { min-width: 0; }
.sd-sub-h { font-size: 16px; font-weight: 800; margin: 0 0 10px; }

/* ---------- charts ---------- */
.sd-chart { margin: 0; }
.sd-chart .lc { height: 240px; }
.sd-chart figcaption { margin-top: 8px; font-size: 13px; color: var(--quiet); }

/* ---------- list pages: filter tools, "Show all" ---------- */
.sd-tools { align-items: flex-end; margin-bottom: 18px; }
.sd-tools .sd-find .fld { min-width: 320px; }
.sd-tools .sd-count { margin: 0 0 7px; }
.sd-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding-bottom: 7px; cursor: pointer; }
.sd-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.sd-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; }
.sd-more .note { margin: 0; }
.sd-more[hidden] { display: none; }
.tbl .sm a.cite { font-weight: 400; }
.tbl td .tag { margin: 2px 6px 2px 0; }

/* ---------- section directory (On the record's .lb-hub) ---------- */
.sd-dir { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sd-dir a b { font-size: 22px; }

/* ---------- calendar: the widget gets the full page ---------- */
.biz-cal .cal:not(.is-live) .cal-ev.k-earnings { grid-template-columns: 74px minmax(0, 1fr) auto; }   /* the first paint, before calendar.js draws */
.sd-days { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.sd-days a { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sd-days a:hover { background: var(--ink); color: var(--paper); }
.sd-days a:hover span { color: #A8A8A8; }
.sd-days span { font-weight: 400; color: var(--quiet); font-size: 13px; }

/* ---------- advisers ---------- */
.sd-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 15px; }
.sd-links a { color: var(--cite); text-decoration: none; }
.sd-links a:hover { text-decoration: underline; }
.sd-new { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.sd-new li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 20px; padding: 11px 0; border-bottom: 1px solid var(--rail); }
.sd-new li > b { font-weight: 600; color: var(--quiet); font-size: 15px; }
.sd-toc { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 18px; font-size: 15px; }
.sd-toc a { font-weight: 600; }
.sd-sources { background: var(--wash); padding: 32px 0 36px; margin-bottom: 0; }
.sd-sources h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 12px; }
.sd-sources ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; max-width: 90ch; }
.sd-sources a { color: var(--cite); }

/* ---------- narrower screens ---------- */
@media (max-width: 1200px) {
  .sd-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sd-three { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sd-pair { gap: 40px; }
}
@media (max-width: 640px) {
  .sd-asof p { margin: -12px 0 28px; font-size: 14px; }
  .sd-facts .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-feed .sd-t { font-size: 16px; }
  .sd-tools .sd-find, .sd-tools .sd-find .fld, .sd-tools .pick, .sd-tools select { width: 100%; min-width: 0; }
  .sd-dir { grid-template-columns: minmax(0, 1fr); }
  .sd-new li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sd-chart .lc { height: 200px; }
}

/* detail pages (an adviser): On the record's company-page title scale */
main:has(.sd-new) .ph h1 { font-size: clamp(36px, 5.2vw, 72px); max-width: 22ch; }
