/* Flat Material. One primary, one accent, white and grey surfaces.
   No radius, no shadow, no gradient, no external stylesheet. */

:root {
  --primary: #1565c0;
  --accent: #bf360c;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --code: #f5f5f5;
  --text: #212121;
  --secondary: #616161;
  --divider: #bdbdbd;
  --max: 1120px;
  --bar: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: none;
}

html {
  scroll-behavior: smooth;
  background: var(--surface);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

a {
  color: var(--primary);
}

a:hover {
  text-decoration: underline;
}

.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  z-index: 2;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.skip:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  overflow: visible;
}

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--bar);
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
}

.appbar a {
  color: #ffffff;
  text-decoration: none;
}

.appbar a:hover {
  text-decoration: underline;
  background: transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: block;
}

.appbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.appbar nav a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.appbar nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero {
  padding: 8px 0 0;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 20px;
}

.kicker a {
  color: var(--primary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}

.hero h1 {
  font-size: 34px;
  line-height: 40px;
}

h2 {
  margin: 24px 0 8px;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.lede {
  max-width: 72ch;
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 16px;
  line-height: 24px;
}

.cta {
  margin: 16px 0 24px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-left: 4px solid var(--primary);
}

.cta p {
  margin: 0;
}

.cta-line {
  font-size: 16px;
  line-height: 24px;
}

.cta-links {
  margin-top: 8px;
}

.cta-links a + a {
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--divider);
}

.mcp-listing {
  margin: 0 0 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 4px solid var(--primary);
}

.mcp-listing h2 {
  margin: 0 0 8px;
}

.mcp-listing p {
  margin: 0;
}

.mcp-listing p + p {
  margin-top: 16px;
}

.mcp-listing img {
  display: block;
  width: 360px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--divider);
}

.lang-jump {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 8px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.lang-jump a {
  padding: 8px 16px;
  border-right: 1px solid var(--divider);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.lang-jump a:hover {
  background: var(--surface-2);
  text-decoration: underline;
}

.lang-block {
  margin: 16px 0 8px;
}

.lang-block h2 {
  margin: 16px 0 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 16px;
}

.repo-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}

.repo-list caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.repo-list th,
.repo-list td {
  border-bottom: 1px solid var(--divider);
  padding: 8px 16px;
  text-align: left;
  vertical-align: top;
}

.repo-list th {
  background: var(--surface-2);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 16px;
}

.repo-list tbody tr:hover {
  background: var(--surface-2);
}

.repo-name {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.blurb {
  display: block;
  margin-top: 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.stats div {
  flex: 1 1 128px;
  margin: 0;
  padding: 8px 16px;
  border-right: 1px solid var(--divider);
}

.stats div:last-child {
  border-right: 0;
}

.stats dt {
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 16px;
}

.stats dd {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.chips span {
  padding: 8px 12px;
  border: 1px solid var(--divider);
  border-right: 0;
  background: var(--surface-2);
  font-size: 12px;
  line-height: 16px;
}

.chips span:last-child {
  border-right: 1px solid var(--divider);
}

.note {
  margin: 8px 0 16px;
  padding: 8px 16px;
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  margin-top: 8px;
}

.toc {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
  padding: 0 16px 16px 0;
  border-right: 1px solid var(--divider);
}

.toc h2 {
  margin: 0;
  padding: 8px 0;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 16px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 0;
  border-top: 1px solid var(--divider);
}

.toc a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.doc {
  padding: 24px 0 8px 24px;
  border-top: 1px solid var(--divider);
}

.doc h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}

.doc-meta {
  margin: 8px 0 16px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

.doc-body p,
.doc-body li {
  max-width: 78ch;
}

.doc-body h3,
.doc-body h4,
.doc-body h5,
.doc-body h6 {
  line-height: 28px;
}

.doc-body pre,
.cta code,
p code,
li code,
td code {
  font-family: ui-monospace, "Roboto Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

.doc-body pre {
  margin: 16px 0;
  padding: 16px;
  overflow: auto;
  background: var(--code);
  border: 1px solid var(--divider);
  line-height: 20px;
}

.doc-body code {
  font-size: 14px;
}

.doc-body p code,
.doc-body li code,
.doc-body td code,
.cta code,
.note code {
  padding: 0 4px;
  background: var(--code);
  border: 1px solid var(--divider);
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}

.doc-body th,
.doc-body td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.doc-body th {
  background: var(--surface-2);
  font-weight: 500;
}

blockquote {
  margin: 16px 0;
  padding: 8px 16px;
  border-left: 4px solid var(--primary);
  color: var(--secondary);
}

hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 24px 0;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--divider);
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

details {
  margin: 16px 0 0;
  padding: 8px 0;
  border-top: 1px solid var(--divider);
}

summary {
  font-weight: 500;
  cursor: pointer;
}

.miss h1 {
  margin-top: 8px;
}

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

.appbar a:focus-visible,
.skip:focus-visible {
  outline-color: #ffffff;
}

@media (max-width: 840px) {
  .hero h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 8px;
    padding: 0 0 8px;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }

  .doc {
    padding-left: 0;
  }

  .appbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .appbar nav {
    margin-left: -16px;
  }
}

@media (max-width: 720px) {
  .repo-list thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .repo-list,
  .repo-list tbody,
  .repo-list tr,
  .repo-list td {
    display: block;
    width: auto;
  }

  .repo-list tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
  }

  .repo-list td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 16px;
    border-bottom: 0;
  }

  .repo-list td:first-child {
    display: block;
    padding-top: 8px;
  }

  .repo-list td::before {
    content: attr(data-label);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .repo-list td:first-child::before {
    content: none;
  }

  .stats div {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--divider);
  }

  .cta-links a {
    display: inline-block;
    margin: 8px 16px 0 0;
  }

  .cta-links a + a {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

.row-links {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
}

.score-value {
  margin: 8px 0 16px;
  color: var(--primary);
  font-size: 48px;
  font-weight: 500;
  line-height: 56px;
}

.score-denom {
  color: var(--secondary);
  font-size: 20px;
  line-height: 28px;
}

.snippet {
  background: var(--code);
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--divider);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
