.site-header,
.site-footer {
  border-color: var(--line);
  border-style: solid;
  padding-left: max(20px, calc((100% - 1160px) / 2));
  padding-right: max(20px, calc((100% - 1160px) / 2));
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-width: 0 0 1px;
}

.site-header nav,
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.site-header nav a {
  font-weight: 650;
  text-decoration: none;
}

.site-header .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #35463a;
  font-size: 17px;
  letter-spacing: .015em;
}
.site-header .brand img { display: block; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.site-header .brand span { white-space: nowrap; }

.site-header nav {
  margin: 0;
  padding: 0;
  border: 0;
}

.site-footer {
  border-width: 1px 0 0;
  padding-top: 26px;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a { text-underline-offset: 3px; }
.site-footer .footer-youtube { margin: 0 0 14px; }
.site-footer .footer-note { margin: 14px 0 0; }
.site-footer .footer-links { margin: 0; padding: 0; border: 0; }
.site-footer .footer-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.site-footer .footer-home { color: #35463a; font-size: 17px; font-weight: 800; text-decoration: none; }
.site-footer .footer-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.site-footer .footer-group { display: grid; justify-items: start; align-content: start; gap: 8px; }
.site-footer .footer-group strong { margin-bottom: 3px; color: #35463a; font-size: 13px; }
.site-footer .footer-group a { overflow-wrap: anywhere; }
.site-footer .footer-note { padding-top: 14px; border-top: 1px solid var(--line); }

.site-sidebar {
  display: grid;
  gap: 16px;
}

.sidebar-card {
  margin: 0;
  padding: 18px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.sidebar-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.sidebar-card nav,
.sidebar-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-card nav a,
.sidebar-card li a {
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.sidebar-card li { margin: 0; }
.sidebar-archive { display: inline-block; margin-top: 12px; font-weight: 700; }

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .site-header nav { gap: 6px 14px; }
  .site-header .brand img { width: 36px; height: 36px; }
  .site-footer .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .site-footer .footer-topline { align-items: flex-start; flex-direction: column; gap: 14px; }
  .site-footer .footer-groups { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
