/* Shared geometry prevents the header from shifting between the two pages. */
html {
  background: #f0f4f8;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}
body {
  margin: 0;
  background: #f0f4f8;
  color: #334155;
  font-family: "Segoe UI", "Microsoft YaHei", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.site-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 12px 0;
}
.site-header {
  margin: 0 0 32px;
  padding: 0;
  view-transition-name: site-header;
}
.site-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #1e293b;
  font-family: inherit;
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.site-title-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  fill: #0d6efd;
}
.site-subtitle {
  margin: 8px 0 0;
  color: #53657b;
  font-size: 16px;
  line-height: 26px;
}
.site-switch {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 160px;
  height: 44px;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font: 600 16px / 24px "Segoe UI", "Microsoft YaHei", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.site-switch svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}
.site-switch:hover {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}
.site-switch:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}
@media (max-width: 1399px) {
  .site-shell { max-width: 1140px; }
}
@media (max-width: 1199px) {
  .site-shell { max-width: 960px; }
}
@media (max-width: 991px) {
  .site-shell { max-width: 720px; }
}
@media (max-width: 767px) {
  .site-shell { max-width: 540px; padding-top: 32px; }
}
@media (max-width: 600px) {
  .site-title { font-size: 26px; line-height: 34px; }
  .site-title-icon { width: 30px; height: 30px; }
  .site-header { margin-bottom: 24px; }
}
@media (max-width: 575px) {
  .site-shell { max-width: none; padding: 28px 16px 0; }
}
@media (max-width: 360px) {
  .site-shell { padding-right: 12px; padding-left: 12px; }
}

/* Normal links/history remain native; unsupported browsers use normal navigation. */
@view-transition { navigation: auto; }
::view-transition-group(root),
::view-transition-group(site-header) { animation-duration: 140ms; }
::view-transition-old(root) { animation: 140ms ease-out both site-fade-out; }
::view-transition-new(root) { animation: 140ms ease-in both site-fade-in; }
::view-transition-old(site-header),
::view-transition-new(site-header) { animation-duration: 100ms; }
@keyframes site-fade-out { to { opacity: 0; } }
@keyframes site-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
