/* Page-local styles for the OpenMRS upstream contributions catalogue. Tokens, header,
   footer, sections, kickers and text links come from /styles.css; this file adds only
   the catalogue components. */

.doc-intro {
  padding: 64px 0 56px;
  color: #fff;
  background: var(--purple-dark);
}

.doc-intro .section-kicker {
  color: var(--gold);
}

.doc-intro h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.08;
}

.doc-intro p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #f3f1f5;
  font-size: 19px;
  line-height: 1.45;
}

.doc-intro .doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 22px;
  color: #d8d4dc;
  font-size: 14px;
}

.doc-intro .doc-meta a {
  color: #fff;
}

.sha,
.path {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--purple-ink);
  background: var(--soft);
}

.doc-intro .sha {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.doc-section h2 {
  max-width: 900px;
}

.doc-section .section-lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

/* Merge order: three pull requests joined by what each hands the next. */
.chain {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 40px;
}

.chain-node {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--purple);
  background: var(--paper);
}

.chain-node .repo {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.chain-node h3 {
  margin: 0;
  color: var(--purple-ink);
  font-size: 18px;
  line-height: 1.3;
}

.chain-node h3 a {
  color: inherit;
  text-decoration: none;
}

.chain-node h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.chain-node dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 14.5px;
}

.chain-node dt {
  color: var(--muted);
}

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

.chain-arrow {
  align-self: center;
  max-width: 120px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.chain-arrow svg {
  display: block;
  margin: 0 auto 8px;
  color: var(--gold-dark);
}

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.pill-ok {
  color: var(--teal-dark);
  background: #dfeeee;
}

.pill-wait {
  color: var(--gold-dark);
  background: #f8ecc9;
}

.pill-muted {
  color: var(--muted);
  background: var(--soft);
}

/* The catalogue itself: one group per capability area. */
.catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px 44px;
  margin-top: 40px;
}

.group h3 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 17px;
  font-weight: 750;
}

.group ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.group li {
  max-width: 60ch;
  font-size: 15.5px;
  line-height: 1.5;
}

.group li::marker {
  color: var(--gold-dark);
}

.group code,
.ledger code,
.dropped code {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(75, 46, 131, 0.07);
}

.guarantees {
  margin-top: 40px;
  padding: 22px 26px;
  border-left: 4px solid var(--purple);
  background: var(--paper);
}

.openmrs-section .guarantees {
  background: #fff;
}

.doc-section:not(.openmrs-section) .guarantees {
  background: var(--soft);
}

.guarantees h3 {
  margin: 0 0 10px;
  color: var(--purple-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guarantees ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  max-width: 76ch;
  font-size: 15.5px;
}

/* Review ledger */
.ledger-wrap {
  margin-top: 36px;
  overflow-x: auto;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ledger th,
.ledger td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ledger th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ledger td:first-child,
.ledger td:nth-child(3) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ledger .sha {
  white-space: nowrap;
}

.ledger-note {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Deliberately not carried */
.dropped {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 40px;
  margin-top: 32px;
}

.dropped article {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.dropped h3 {
  margin: 0 0 4px;
  color: var(--purple-ink);
  font-size: 16px;
}

.dropped p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.doc-sources {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}

.doc-sources p {
  max-width: 820px;
  margin: 0 0 8px;
}

@media (max-width: 980px) {
  .chain {
    grid-template-columns: 1fr;
  }

  .chain-arrow {
    max-width: none;
    padding: 6px 0;
  }

  .chain-arrow svg {
    transform: rotate(90deg);
  }

  .doc-intro h1 {
    font-size: 36px;
  }
}

@media (max-width: 720px) {
  .doc-intro {
    padding: 44px 0 40px;
  }

  .doc-intro h1 {
    font-size: 30px;
  }

  .doc-intro p {
    font-size: 17px;
  }

  .catalogue {
    gap: 26px;
  }
}
