* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #26313b;
  background: #f7f6f3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.75;
}

a {
  color: #235f68;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid #e8e2d8;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 20px rgba(57, 45, 30, 0.045);
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  color: #d94f22;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.hero {
  padding: 26px 0 18px;
  background: transparent;
}

.hero .wrap {
  padding: 28px 30px;
  border: 1px solid #e9e1d6;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 10px 26px rgba(82, 62, 35, 0.045);
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.18;
}

.hero p {
  max-width: 820px;
  margin: 14px 0 0;
  color: #586675;
  font-size: 17px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  padding: 28px 0 48px;
}

.panel,
.toc {
  border: 1px solid #e7ecef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(49, 61, 71, 0.04);
}

.panel {
  padding: 28px;
}

.panel + .panel {
  margin-top: 20px;
}

.toc {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 20px;
}

.toc h2,
.panel h2,
.panel h3 {
  margin-top: 0;
  line-height: 1.35;
}

.toc h2 {
  font-size: 18px;
}

.toc ul,
.link-list,
.quote-list,
.faq-list {
  margin: 0;
  padding-left: 20px;
}

.toc li,
.link-list li,
.quote-list li,
.faq-list li {
  margin: 8px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.item {
  border: 1px solid #edf0f3;
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfd;
}

.msn-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.msn-stat {
  padding: 14px 16px;
  border: 1px solid #ece6dc;
  border-radius: 6px;
  background: #fbfaf7;
}

.msn-stat strong,
.msn-stat span {
  display: block;
}

.msn-stat span {
  margin-top: 4px;
  color: #73808a;
  font-size: 13px;
}

.msn-toolbar,
.pager {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

.pager {
  justify-content: space-between;
}

.btn,
.btn-secondary,
.copy-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.btn {
  border: 1px solid #d9e2e5;
  background: #fff;
  color: #2f6970;
}

.btn-secondary,
.copy-quote {
  border: 1px solid #e0e7eb;
  background: #fff;
  color: #44515c;
}

.btn:hover,
.btn-secondary:hover,
.copy-quote:hover {
  border-color: #d85a2a;
  background: #fff8f4;
  color: #c94f22;
  text-decoration: none;
}

.copy-quote {
  min-height: 30px;
  margin-top: 8px;
  font-size: 13px;
  cursor: pointer;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.page-grid li {
  margin: 0;
}

.page-grid a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #e8edf0;
  border-radius: 6px;
  background: #fbfcfd;
  color: #40505b;
}

.page-grid a:hover {
  border-color: #d7e1e5;
  background: #fffdfa;
  color: #235f68;
  text-decoration: none;
}

.item h3 {
  margin-bottom: 8px;
}

.meta {
  color: #6b7280;
  font-size: 14px;
}

.quote-list li {
  padding: 14px 0 14px 4px;
  border-bottom: 1px solid #eef2f4;
}

.quote-list li:last-child {
  border-bottom: 0;
}

.quote-list strong {
  display: block;
  margin-bottom: 4px;
  color: #26313b;
  font-size: 16px;
  line-height: 1.85;
}

.callout {
  border-left: 4px solid #d85a2a;
  padding: 14px 16px;
  background: #fbfaf7;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid #e6e8eb;
  color: #6b7280;
  background: #fff;
  font-size: 14px;
}

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

  .toc {
    position: static;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }
}
