* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f2f2f2;
  color: #202122;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.58;
}

.site-header {
  width: 100%;
  padding: 10px 24px 12px;
  background: #f5f5f5;
  border-bottom: 1px solid #dadce0;
}

.site-header h1 {
  margin: 0 0 2px;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  color: #54595d;
  font-size: 0.95rem;
}

.layout {
  max-width: 1660px;
  margin: 0 auto;
  padding: 16px 22px 56px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}

.toc {
  border: 1px solid #c8ccd1;
  background: #f8f9fa;
  padding: 10px 12px 12px;
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow: auto;
}

.toc h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  padding-bottom: 2px;
  font-weight: 600;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
}

.toc li {
  margin: 7px 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

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

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

.article {
  min-width: 0;
  border: 1px solid #c8ccd1;
  background: #ffffff;
  padding: 22px 22px 32px;
}

.article h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.15;
}

.updated {
  margin: 0 0 10px;
  color: #54595d;
  font-size: 0.97rem;
}

.article h2 {
  font-size: 1.68rem;
  font-weight: 500;
  margin: 12px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dadce0;
}

.article h3 {
  font-size: 1.22rem;
  margin: 18px 0 6px;
  font-weight: 600;
}

.article p {
  margin: 0 0 14px;
  font-size: 1.04rem;
}

.infobox {
  float: right;
  width: min(100%, 500px);
  margin: 2px 0 16px 26px;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  background: #f8f9fa;
}

.infobox th,
.infobox td {
  border: 1px solid #a2a9b1;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 1.02rem;
}

.infobox thead th {
  text-align: center;
  background: #c8d4e6;
  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 700;
  color: #202122;
}

.infobox tbody th {
  width: 30%;
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 700;
  background: #f8f9fa;
}

.infobox tbody td {
  width: 70%;
  font-size: 1.02rem;
}

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

  .toc {
    position: static;
    max-height: none;
  }

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

  .article h1 {
    font-size: 1.72rem;
  }

  .article h2 {
    font-size: 1.5rem;
  }

  .article h3 {
    font-size: 1.15rem;
  }

  .article p,
  .toc li,
  .infobox tbody td {
    font-size: 1rem;
  }

  .infobox tbody th {
    font-size: 1rem;
  }
}
