/* s6y: SEC filings, pure and simple.

   Visual idea: green-bar ledger paper, the continuous-feed paper financial
   reports were printed on. Lists alternate pale green bands to keep the eye on
   the row; links are blue-pen ink. Public Sans (the US Web Design System face)
   for the interface; filings keep their own typography.

   Cascade layers for filing documents, lowest first:
     base  - defaults for document content (below)
     filer - the filer's own stylesheet, scoped to .doc-body by the renderer
     (unlayered) - the filer's former inline styles, now classes, and the
                   dark-theme corrections at the end of this file */
@layer base, filer;

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-v21.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f8fbf6;
  --band: #e5f1e1;
  --rule: #c5d6c0;
  --rule-strong: #9fb59a;
  --ink: #1e2a27;
  --muted: #5b6a64;
  --accent: #2346a0;
  --accent-strong: #142f78;
  --field: #ffffff;
  --form-data: #1d3fa0;
  --font-ui: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-doc: "Times New Roman", Tinos, "Liberation Serif", Times, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121815;
    --band: #18231d;
    --rule: #2c3b33;
    --rule-strong: #46594e;
    --ink: #dce6e0;
    --muted: #94a49c;
    --accent: #8fb0ff;
    --accent-strong: #b9cdff;
    --field: #0d120f;
    --form-data: #a9c3ff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #121815;
  --band: #18231d;
  --rule: #2c3b33;
  --rule-strong: #46594e;
  --ink: #dce6e0;
  --muted: #94a49c;
  --accent: #8fb0ff;
  --accent-strong: #b9cdff;
  --field: #0d120f;
  --form-data: #a9c3ff;
  color-scheme: dark;
}

/* Page */

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(.reader-bar) {
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
}

body > main {
  flex: 1;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2.25rem 0 0.625rem;
}

.page-title {
  font-size: clamp(1.5rem, 4.5vw, 2.125rem);
  font-weight: 750;
  letter-spacing: -0.015em;
  margin: 1.75rem 0 0.75rem;
}

.count {
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.note,
.empty {
  color: var(--muted);
}

.empty {
  font-size: 1.0625rem;
  max-width: 38rem;
}

.wordmark {
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}

/* Search */

.search input {
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--rule-strong);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  padding: 0.5rem 0.75rem;
}

.search button,
details.menu > summary {
  font: inherit;
  font-weight: 650;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0 2px 2px 0;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.search button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.search-compact,
.search-row {
  display: flex;
}

.search-compact {
  flex: 1;
  max-width: 26rem;
  margin-left: auto;
}

.search-large {
  max-width: 36rem;
  margin: 2rem 0 0;
}

.search-large label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.375rem;
}

.search-large input,
.search-large button {
  padding: 0.75rem 1rem;
  font-size: 1.0625rem;
}

/* Masthead and footer */

.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.625rem;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem;
}

.footer-row p {
  margin: 0 auto 0 0;
}

.link-button {
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

/* Home: the page itself is a sheet of green-bar paper, three lines to a band.
   Everything above the fold sits on that grid: wordmark, headline, lede and
   search each fill exactly one band. */

body.home {
  --line: 1.75rem;
  --band-height: calc(var(--line) * 3);
  background: repeating-linear-gradient(
    to bottom,
    var(--band) 0 var(--band-height),
    transparent var(--band-height) calc(var(--band-height) * 2)
  );
}

.home-main {
  padding-top: var(--band-height);
  padding-bottom: var(--band-height);
}

/* Each block takes one band and sits centred in it, like print on the paper. */
.home-main > * {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--band-height);
  margin: 0;
}

.wordmark-large {
  font-size: clamp(4.5rem, 15vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.home-title {
  max-width: 17ch;
  font-size: clamp(1.625rem, 5.5vw, 2.125rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.home-lede {
  max-width: 32ch;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.home-main .search-large {
  max-width: 36rem;
  gap: 0.25rem;
}

.home-main .search-large label {
  margin: 0;
  font-size: 0.9375rem;
}

.home-main .search-large :is(input, button) {
  padding-block: 0.5rem;
}

.home-main .search-row {
  height: 2.75rem;
}

/* Ledger lists: alternate rows on green-bar bands. */

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.ledger-row {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  column-gap: 1rem;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.ledger > li:nth-child(odd) > .ledger-row {
  background: var(--band);
}

a.ledger-row:hover .filing-desc,
a.ledger-row:hover .result-name,
a.ledger-row:hover .document-desc {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.form-type {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.filing-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.filing-row time {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.filing-desc {
  grid-column: 1 / -1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.results .ledger-row,
.documents .ledger-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.result-tickers,
.document-type {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

details.more > summary {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

details.more[open] > summary {
  margin-bottom: 0.5rem;
}

details.more > .ledger {
  border-top: 0;
}

/* Company page */

.entity-header {
  margin-bottom: 1.5rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  margin: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.8125rem;
}

.facts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.filing-group h2 {
  margin-top: 0;
}

.filing-groups {
  display: grid;
  gap: 2.5rem 3rem;
}

@media (min-width: 64rem) {
  body.company .wrap {
    max-width: 72rem;
  }

  .filing-groups {
    grid-template-columns: 1fr 1fr;
  }
}

.related {
  margin-top: 3rem;
}

.related .note {
  margin-top: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Filing page */

.crumbs {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}

.crumbs + .entity-header .page-title {
  margin-top: 0.25rem;
}

.form-type-large {
  display: block;
  font-size: 1.15em;
}

.plain-links {
  padding-left: 1.25rem;
}

/* Terms */

.prose {
  max-width: 44rem;
}

.prose h2 {
  font-size: 1.25rem;
}

/* Reader: a document page. */

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
}

.reader-bar-row {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.375rem 1rem;
}

.reader-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  color: var(--ink);
  line-height: 1.25;
  text-decoration: none;
}

.reader-company {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 650;
}

.reader-meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.reader-meta .form-type {
  color: var(--ink);
}

details.menu {
  position: relative;
}

details.menu > summary {
  list-style: none;
  border-radius: 2px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

details.menu > summary::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(22rem, calc(100vw - 2rem));
  max-height: 70vh;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  font-size: 0.9375rem;
}

.menu-panel > a,
.menu-panel > button {
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.menu-panel > :nth-child(odd) {
  background: var(--band);
}

.menu-panel [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* Filing document content. Filers' markup assumes a printed page; let it reflow. */

@layer base {
  .doc-body {
    box-sizing: border-box;
    /* A width (not just auto margins) so this flex item never grows to fit wide tables. */
    width: 100%;
    min-width: 0;
    max-width: 62rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    font-family: var(--font-doc);
    line-height: normal;
    overflow-wrap: break-word;
  }

  .doc-body div,
  .doc-body p,
  .doc-body center {
    max-width: 100%;
  }

  .doc-body img {
    max-width: 100%;
    height: auto;
  }

  .doc-body .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .doc-body a {
    color: var(--accent);
  }

  /* SEC form stylesheets (Forms 3/4/5, D, 13F) mark filed values in blue. */
  .doc-body :is(.FormData, .FormDataC, .FormDataR, .SmallFormData) {
    color: var(--form-data);
  }
}

/* Coloured table cells keep dark text in either theme. */
.doc-body .bg-color.black-req,
.doc-body .bg-color .black-req,
.doc-body .bg-color.no-fg-color {
  color: #000;
}

/* Dark theme corrections for document content. Filings draw rules and borders
   in black and assume white paper behind transparent images. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc-body {
    & :is(td, th, hr, table, div, p) {
      border-color: var(--rule-strong) !important;
    }
    & hr {
      background-color: var(--rule-strong);
      color: var(--rule-strong);
    }
    & img {
      background: #fff;
    }
    & .bg-light {
      background-color: var(--band) !important;
    }
    & :is(.bg-light.black-req, .bg-light .black-req, .bg-light.no-fg-color) {
      color: var(--ink);
    }
    & :is(.FormData, .FormDataC, .FormDataR, .SmallFormData, .FormText, .FormTextR, .FormTextC, .label) {
      background-color: transparent !important;
    }
  }
}

:root[data-theme="dark"] .doc-body {
  & :is(td, th, hr, table, div, p) {
    border-color: var(--rule-strong) !important;
  }
  & hr {
    background-color: var(--rule-strong);
    color: var(--rule-strong);
  }
  & img {
    background: #fff;
  }
  & .bg-light {
    background-color: var(--band) !important;
  }
  & :is(.bg-light.black-req, .bg-light .black-req, .bg-light.no-fg-color) {
    color: var(--ink);
  }
  & :is(.FormData, .FormDataC, .FormDataR, .SmallFormData, .FormText, .FormTextR, .FormTextC, .label) {
    background-color: transparent !important;
  }
}

@media print {
  .reader-bar,
  .site-footer {
    display: none;
  }
}
