html {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
  color: #222;
  background: #f3efdf;
}

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

a:hover,
a:focus {
  color: #0b2f7b;
}

.site-shell {
  max-width: 1120px;
  margin: 0 auto;
  background: #fffdf8;
  min-height: 100vh;
  box-shadow: 0 0 0 1px #d7d0bb;
}

.site-header {
  background: #3a3025;
  border-bottom: 4px solid #85745b;
  color: #f5efe0;
}

.header-inner {
  padding: 1.4rem 1.5rem 1.15rem;
}

.site-name {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.2;
}

.site-name a {
  color: #f7f3e7;
  text-decoration: none;
}

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

.site-tagline {
  margin: 0.35rem 0 0;
  color: #ddd4c1;
  font-size: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
}

.sidebar {
  padding: 1.4rem 1rem 1.8rem 1.5rem;
  background: #ece5d1;
  border-right: 1px solid #d4cab0;
}

.sidebar-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #47392c;
}

.primary-nav ul,
.future-topics {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav li,
.future-topics li {
  margin: 0 0 0.45rem;
}

.primary-nav a {
  display: block;
  padding: 0.2rem 0.35rem;
  border: 1px solid transparent;
  text-decoration: none;
}

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

.primary-nav a[aria-current="page"] {
  background: #fffdf8;
  border-color: #cabc9f;
  font-weight: bold;
  color: #1f1f1f;
  text-decoration: none;
}

.sidebar-section {
  margin-top: 1.7rem;
  padding-top: 1rem;
  border-top: 1px solid #cfc3a6;
}

.future-topics li {
  color: #646464;
}

.content {
  padding: 1.7rem 2rem 2rem;
}

.content h1 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 2rem;
  line-height: 1.2;
  color: #241d16;
}

.content h2 {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  font-size: 1.4rem;
  line-height: 1.3;
  color: #2f261d;
  border-bottom: 1px solid #d8d0ba;
  padding-bottom: 0.2rem;
}

.content p {
  margin: 0 0 1rem;
}

.notice {
  margin: 0 0 1.25rem;
  padding: 0.8rem 0.95rem;
  background: #f7f1df;
  border: 1px solid #d8ccb0;
  color: #3a3125;
}

.site-footer {
  padding: 1rem 1.5rem 1.4rem;
  border-top: 1px solid #d3cab2;
  background: #f1ebda;
  color: #40382d;
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #d4cab0;
    padding-right: 1.5rem;
  }

  .content {
    padding: 1.4rem 1.5rem 1.8rem;
  }
}

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

  .header-inner,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .sidebar,
  .content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-name,
  .content h1 {
    font-size: 1.7rem;
  }
}
