/* Strategy Studio: black on white, monospace, nothing else. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 640px;
  padding: 48px 16px 64px;
  background: #fff;
  color: #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

header {
  margin-bottom: 64px;
}

.site-name {
  font-weight: bold;
  letter-spacing: 0.02em;
  text-decoration: none;
}

h1,
h2 {
  font-size: 1em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 32px;
}

h2 {
  margin: 40px 0 8px;
}

p,
ul {
  margin: 0 0 24px;
}

ul {
  padding-left: 2ch;
}

li {
  margin-bottom: 8px;
}

/* Search form */

.note {
  margin: 40px 0 8px;
  font-size: 14px;
}

.note + .search {
  margin-top: 0;
}

.search {
  display: flex;
  gap: 8px;
  margin: 40px 0 48px;
}

.search input,
.search button {
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  border: 2px solid #000;
  border-radius: 0;
  padding: 10px 12px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  color: #000;
}

.search input::placeholder {
  color: #000;
  opacity: 0.55;
}

.search button {
  flex: 0 0 auto;
  background: #000;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.search button:hover {
  background: #fff;
  color: #000;
}

@media (max-width: 380px) {
  .search {
    flex-direction: column;
  }
}

footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 2px solid #000;
  font-size: 14px;
}

footer p {
  margin-bottom: 12px;
}

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

/* Data pages: a wider column, tables, faint raw IRS field names. */

body.wide {
  max-width: 1100px;
}

.muted,
.raw,
.count {
  font-size: 13px;
  opacity: 0.6;
}

.raw {
  margin-left: 0.5ch;
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
}

.scroll {
  overflow-x: auto;
  margin: 0 0 24px;
}

table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #000;
  padding: 4px 8px 4px 0;
  text-align: left;
  vertical-align: top;
}

th {
  border-bottom-width: 2px;
  white-space: nowrap;
}

td.n,
th.n {
  text-align: right;
  white-space: nowrap;
  padding-left: 8px;
}

tr.superseded td {
  opacity: 0.55;
}

tr.total td {
  font-weight: bold;
  border-top: 2px solid #000;
}

h3,
h4 {
  font-size: 1em;
  margin: 24px 0 8px;
}

.results {
  list-style: none;
  padding: 0;
}

.results > li {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #000;
}

.results .name {
  font-weight: bold;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: -24px 0 32px;
  font-size: 14px;
}

.filters label {
  display: flex;
  flex-direction: column;
}

.filters input,
.filters button {
  font: inherit;
  border: 1px solid #000;
  border-radius: 0;
  padding: 4px 6px;
  background: #fff;
  color: #000;
  width: 14ch;
}

.filters button {
  align-self: flex-end;
  background: #000;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  width: auto;
}

.pager {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 0 0 24px;
}

dl.facts dt {
  font-weight: bold;
}

dl.facts dd {
  margin: 0;
}

/* The full-990 viewer */

.filing section {
  border-top: 2px solid #000;
  margin-top: 32px;
}

.filing .group {
  margin-left: 2ch;
}

.filing .f {
  font-size: 14px;
  padding: 1px 0;
}

.filing .k {
  display: inline-block;
  min-width: 28ch;
}

.filing .v {
  font-weight: bold;
}

table.xml th .raw {
  display: block;
  margin-left: 0;
}

.toc {
  columns: 2;
  font-size: 14px;
}

@media (max-width: 640px) {
  .toc {
    columns: 1;
  }

  .filing .k {
    min-width: 0;
    display: block;
  }
}
