/* SITLA's paper, ink and vermilion palette, shared with the landing page. */
:root {
  --paper: #f4f1ea;
  --ink: #1a1a18;
  --muted: #6b675f;
  --rule: #cfc9bd;
  --accent: #b8321f;
  --serif: "Shippori Mincho", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.02em;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule);
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
}
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  padding: 12px;
  background: var(--paper);
  z-index: 5;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: 1240px;
  min-height: 90px;
  margin: auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 174px;
  height: auto;
}
.header-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.header-link span {
  margin-left: 6px;
  color: var(--muted);
}
.legal-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px 96px;
}
.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px 32px;
  padding: 32px 0;
}
.document-toc {
  margin: 0 0 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.8;
}
.document-toc summary {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.document-toc:not([open]) summary {
  margin-bottom: 0;
}
.protocol-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.8;
}
.protocol-nav a {
  color: var(--muted);
}
.protocol-nav a[aria-current] {
  color: var(--accent);
  font-weight: 700;
}
.document-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.document-toc li + li {
  margin-top: 8px;
}
.markdown-body pre {
  white-space: pre;
  overflow-wrap: normal;
}
.page-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid transparent;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  text-decoration: none;
}
.page-nav a[aria-current] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.page-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.document-card {
  background: var(--paper);
  border-top: 1px solid var(--ink);
  overflow-wrap: anywhere;
}
.document-heading {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.04em;
  text-wrap: balance;
  line-height: 1.5;
  font-weight: 700;
  text-align: left;
}
.document-content {
  padding: 40px 0 56px;
}
.source-note {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 32px;
  padding: 16px;
  border-left: 2px solid var(--rule);
  background: #ebe6dc;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.source-note svg {
  align-self: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.source-note a {
  color: inherit;
}
.source-link {
  margin-left: 0.8em;
  white-space: nowrap;
}
.markdown-body {
  font-size: 15px;
  line-height: 1.9;
}
.markdown-body > :first-child {
  margin-top: 0;
}
.markdown-body > :last-child {
  margin-bottom: 0;
}
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  line-height: 1.5;
  font-family: var(--serif);
  font-weight: 700;
  scroll-margin-top: 28px;
}
.markdown-body h2 {
  font-size: 24px;
  margin: 56px 0 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.markdown-body h3 {
  font-size: 19px;
  margin: 36px 0 16px;
}
.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin: 24px 0;
}
.markdown-body ul,
.markdown-body ol {
  padding-left: 1.8em;
}
.markdown-body li + li {
  margin-top: 4px;
}
.markdown-body blockquote {
  margin: 24px 0;
  border-left: 3px solid var(--accent);
  padding: 2px 20px;
  color: var(--muted);
}
.markdown-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 3px 6px;
  background: #ebe6dc;
  border-radius: 4px;
}
.markdown-body pre {
  padding: 20px;
  overflow: auto;
  background: #ebe6dc;
  border-radius: 4px;
}
.markdown-body pre code {
  padding: 0;
}
.markdown-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  max-width: 100%;
}
.markdown-body th,
.markdown-body td {
  padding: 10px 14px;
  border: 1px solid var(--rule);
}
.markdown-body th {
  background: #ebe6dc;
}
.markdown-body img {
  max-width: 100%;
  height: auto;
}
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.site-footer > div {
  max-width: 1240px;
  margin: auto;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.footer-brand {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 11px;
}
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer small {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .header-inner {
    padding: 22px 24px;
    gap: 16px;
  }
  .legal-container {
    padding: 0 24px 48px;
  }
  .page-nav {
    padding: 24px 0;
    gap: 8px 24px;
  }
  .document-heading {
    padding: 32px 0;
  }
  h1 {
    font-size: 28px;
  }
  .document-content {
    padding: 28px 0 36px;
  }
  .source-note {
    padding: 14px;
    font-size: 12px;
    margin-bottom: 28px;
  }
  .markdown-body {
    font-size: 14px;
  }
  .markdown-body h2 {
    font-size: 20px;
    margin-top: 40px;
  }
  .site-footer > div {
    padding: 26px 20px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .site-footer nav {
    width: 100%;
    order: 3;
    gap: 20px;
  }
}

::selection {
  background: #e8d6b8;
  color: var(--ink);
}
.protocol-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
