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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Linux Libertine", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
  color: #202122;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #0645ad;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: #0b0080;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #a2a9b1;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: sans-serif;
  font-size: 14px;
}

.site-title {
  font-weight: 600;
  color: #202122;
}

.tab-search {
  background: #202122;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  border: none;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.toc {
  position: sticky;
  top: 70px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 14px 16px;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  font-family: sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
}

.toc-title {
  font-weight: 700;
  font-size: 14px;
  color: #202122;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #c8ccd1;
}

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

.toc > ol > li {
  counter-increment: section;
  margin: 4px 0;
}

.toc > ol > li > a::before {
  content: counter(section) ". ";
  font-weight: 600;
  color: #202122;
}

.toc ol ol {
  counter-reset: subsection;
  margin: 4px 0 8px 14px;
}

.toc ol ol li {
  counter-increment: subsection;
  margin: 2px 0;
}

.toc ol ol li a::before {
  content: counter(section) "." counter(subsection) " ";
  color: #54595d;
}

.toc a {
  color: #0645ad;
  display: inline-block;
  padding: 1px 0;
}

.toc a.active {
  color: #202122;
  font-weight: 700;
}

.toc::-webkit-scrollbar {
  width: 6px;
}

.toc::-webkit-scrollbar-thumb {
  background: #c8ccd1;
  border-radius: 3px;
}

.article {
  max-width: 100%;
  min-width: 0;
}

.article-title {
  font-family: "Linux Libertine", Georgia, serif;
  font-size: 2.1em;
  font-weight: 400;
  margin: 0 0 4px 0;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #a2a9b1;
  color: #000000;
}

.last-updated {
  font-family: sans-serif;
  font-size: 12.5px;
  color: #54595d;
  margin: 0 0 18px 0;
}

.lead {
  font-size: 16px;
  line-height: 1.7;
}

.infobox {
  float: right;
  width: 300px;
  margin: 0 0 16px 24px;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 13.5px;
  background: #f8f9fa;
}

.infobox caption {
  background: #cedff2;
  font-weight: 700;
  padding: 8px 6px;
  font-size: 14px;
  text-align: center;
  color: #202122;
  border: 1px solid #a2a9b1;
  border-bottom: none;
}

.infobox th,
.infobox td {
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid #eaecf0;
  line-height: 1.4;
}

.infobox th {
  width: 38%;
  font-weight: 700;
  background: transparent;
}

.infobox td {
  background: transparent;
}

.article h2 {
  font-family: "Linux Libertine", Georgia, serif;
  font-size: 1.55em;
  font-weight: 400;
  margin: 36px 0 12px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #a2a9b1;
  color: #000000;
  scroll-margin-top: 80px;
}

.article h3 {
  font-family: "Linux Libertine", Georgia, serif;
  font-size: 1.2em;
  font-weight: 700;
  margin: 26px 0 8px 0;
  color: #202122;
  scroll-margin-top: 80px;
}

.article p {
  margin: 0 0 14px 0;
}

.article ul,
.article ol {
  margin: 0 0 14px 0;
  padding-left: 28px;
}

.article li {
  margin-bottom: 6px;
}

.article strong {
  font-weight: 700;
}

.article em {
  font-style: italic;
}

.mobile-toc-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
  }

  .infobox {
    width: 260px;
    margin-left: 16px;
  }
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 20px;
  }

  .infobox {
    float: none;
    width: 100%;
    margin: 16px 0;
  }

  .article-title {
    font-size: 1.7em;
  }

  .article h2 {
    font-size: 1.35em;
  }
}

@media print {
  .site-header,
  .toc,
  .tab-search,
  .mobile-toc-toggle {
    display: none;
  }

  .layout {
    display: block;
  }

  .infobox {
    page-break-inside: avoid;
  }

  body {
    font-size: 11pt;
    color: #000;
  }
}
