:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #171717;
  --text: #33302b;
  --muted: #716b62;
  --line: #e4ddd2;
  --soft: #f2eee7;
  --blue: #285ca8;
  --green: #14745d;
  --amber: #9b6428;
  --shadow: 0 18px 55px rgba(51, 48, 43, .08);
  --measure: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(242, 238, 231, .58), rgba(251, 250, 247, 0) 360px),
    var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

a:hover {
  color: var(--blue);
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 40;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
}

.skip:focus {
  left: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, .92);
  border-bottom: 1px solid rgba(228, 221, 210, .84);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(100% - 32px, var(--measure));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 15px;
  line-height: 1.25;
}

.brand-copy small {
  max-width: 420px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.reader-shell {
  width: min(100% - 32px, var(--measure));
  margin-inline: auto;
}

.reader-hero {
  padding-block: 68px 28px;
}

.reader-hero.compact {
  padding-block: 40px 22px;
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 880;
}

.reader-hero p:not(.kicker),
.page-hero p,
.hero p {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
}

.text-link {
  color: var(--blue);
  font-weight: 720;
}

.text-link.strong {
  color: var(--green);
}

.quick-notes {
  display: grid;
  gap: 12px;
  margin: 10px 0 32px;
  padding: 0;
}

.quick-notes a {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.quick-notes a:last-child {
  border-bottom: 1px solid var(--line);
}

.quick-notes strong {
  font-size: 18px;
  line-height: 1.35;
}

.quick-notes span {
  color: var(--muted);
  font-size: 15px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 30px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.reader-article {
  padding-bottom: 42px;
}

.prose,
.content,
.imported-page {
  max-width: var(--measure);
}

.prose > *:first-child,
.content > *:first-child {
  margin-top: 0;
}

.prose > * + *,
.content > * + * {
  margin-top: 1.15rem;
}

.prose p,
.prose li,
.prose td,
.content p,
.content li,
.content td {
  color: var(--text);
}

.prose h2,
.content h2 {
  margin: 2.5rem 0 0;
  padding-top: .3rem;
  font-size: 29px;
  font-weight: 820;
}

.prose h3,
.content h3 {
  margin: 2rem 0 0;
  color: #24221f;
  font-size: 22px;
  font-weight: 780;
}

.prose p,
.content p {
  margin-bottom: 0;
}

.prose ul,
.prose ol,
.content ul,
.content ol {
  padding-left: 1.35rem;
}

.prose li + li,
.content li + li {
  margin-top: .45rem;
}

.prose code,
.content code {
  padding: .12em .34em;
  color: #1d4f87;
  background: #eef4f8;
  border-radius: 5px;
  font-size: .94em;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-block: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.58;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: var(--soft);
  font-weight: 780;
}

tr:last-child td {
  border-bottom: 0;
}

.protocol-grid {
  display: grid;
  gap: 12px;
  margin-top: 1.2rem;
}

.protocol-grid section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
}

.protocol-grid h3 {
  margin-top: 0;
  font-size: 18px;
}

.protocol-index-section ul {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
}

.protocol-index-section li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.protocol-index-section span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.button,
.button.primary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: .8rem;
  padding: 9px 14px;
  color: #fff;
  background: var(--green);
  border-radius: 7px;
  font-weight: 760;
  text-decoration: none;
}

.search-box {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.article-list {
  display: grid;
  gap: 0;
  padding-bottom: 58px;
}

.article-list.featured {
  margin-top: 46px;
}

.section-head {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: 29px;
}

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

.article-row:last-child {
  border-bottom: 1px solid var(--line);
}

.article-row time {
  display: block;
  margin-bottom: 7px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 760;
}

.article-row h2,
.article-row h3 {
  margin: 0;
  font-size: 22px;
}

.article-row a {
  text-decoration: none;
}

.article-row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.article-row[hidden] {
  display: none;
}

.site-footer {
  margin-top: 36px;
  padding-block: 30px 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 16px;
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-inner a {
  color: var(--muted);
}

@media (min-width: 720px) {
  .protocol-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .brand-copy small {
    max-width: calc(100vw - 92px);
  }

  .reader-hero {
    padding-block: 44px 22px;
  }

  .reader-hero.compact {
    padding-block: 30px 18px;
  }

  h1 {
    font-size: 34px;
  }

  .reader-hero p:not(.kicker),
  .page-hero p,
  .hero p {
    font-size: 17px;
  }

  .prose h2,
  .content h2 {
    font-size: 25px;
  }

  .protocol-index-section li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
