/* Company pages and the companies index (src/filedfor/pages_company.py).
   Tokens come from style.css. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.cc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.cc-head h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cc-logo { flex: none; width: 48px; height: 48px; border-radius: 10px; background: #fff; border: 1px solid var(--line); object-fit: contain; }
.page .notice-box { max-width: 760px; }
.page .notice-box strong { display: block; margin-bottom: 2px; }
.stats .stat:only-child { max-width: 280px; }
.cc-fine { color: var(--muted); font-size: 13px; max-width: 760px; margin: 8px 0 0; }
.cc-actions { margin: 14px 0 0; }
.page .ptable caption { caption-side: top; }
.page .note p { margin: 0 0 8px; }
.page .note p:last-child { margin-bottom: 0; }
.page .note a { color: inherit; font-weight: 650; }

/* Filings by quarter: one column per quarter, the value above each bar and
   the quarter below, so the chart reads as plain text too. */
.qchart { list-style: none; margin: 12px 0 0; padding: 14px 12px 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 760px; }
.qchart li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; text-align: center; --unit: 1.4px; }
.qlabel { order: 3; align-self: stretch; border-top: 1px solid var(--line-strong); padding-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.qlabel small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.qval { order: 1; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; padding-bottom: 4px; }
.qbar { order: 2; width: min(44px, 100%); height: calc(var(--h, 0) * var(--unit)); background: var(--brand); border-radius: 4px 4px 0 0; }
.qgap .qval { color: var(--muted); font-weight: 400; }
.qgap .qbar { height: calc(100 * var(--unit)); background: none; border: 1px dashed var(--line-strong); border-bottom: 0; }

.cc-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 20px; align-items: start; }
.cc-pair .ptable td:first-child { overflow-wrap: anywhere; }
.links .cc-n { color: var(--muted); font-size: 12.5px; margin-left: 4px; font-variant-numeric: tabular-nums; }

.cc-jump { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px 0 6px; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 8px 0; }
.cc-jump a { min-width: 34px; padding: 6px 8px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.cc-jump a:hover { border-color: var(--brand); }
.page section[id^="letter-"] { scroll-margin-top: 64px; }
.cc-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 20px; }
.cc-index li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.cc-index a { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.cc-index span { flex: none; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .page .ptable { font-size: 13px; }
  .page .ptable th, .page .ptable td { padding: 8px 7px; }
  .cc-pair { grid-template-columns: 1fr; }
  .cc-logo { width: 40px; height: 40px; }
  .qchart { gap: 4px; padding: 12px 6px 8px; }
  .qchart li { --unit: 1.1px; }
  .qval { font-size: 11.5px; }
  .qlabel { font-size: 11px; }
  .qlabel small { font-size: 10px; }
}
