:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: #111827;
  line-height: 1.75;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.page-header .header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111827;
  font-weight: 700;
  font-size: 1.4rem;
}

.page-header .brand svg {
  width: 36px;
  height: 36px;
  color: #d4af37;
}

.page-header nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.page-header nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
}

.page-header nav a:hover,
.page-header nav a[aria-current="page"] {
  color: #111827;
}

.hero-section {
  background: linear-gradient(120deg, rgba(79, 70, 229, 0.08), rgba(236, 72, 153, 0.08));
  padding: 56px 0;
}

.hero-section .hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-section h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 700;
  color: #1f2937;
}

.hero-section p {
  margin: 12px 0 0;
  font-size: 1.1rem;
  color: #4b5563;
}

main.page-content {
  flex: 1;
}

.page-article {
  max-width: 960px;
  margin: -40px auto 64px;
  padding: 40px 28px 56px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
}

.page-article h2 {
  margin-top: 36px;
  color: #4338ca;
  font-size: 1.75rem;
  font-weight: 600;
}

.page-article h3 {
  margin-top: 24px;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
}

.page-article p {
  margin: 16px 0;
  color: #374151;
  font-size: 1rem;
}

.page-article ul,
.page-article ol {
  margin: 12px 0 24px 20px;
  padding-left: 4px;
  color: #374151;
}

.page-article li {
  margin-bottom: 10px;
}

.page-article a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.page-article a:hover {
  text-decoration: underline;
}

.site-footer {
  background: #111827;
  color: rgba(255, 255, 255, 0.78);
  padding: 60px 24px 48px;
}

.site-footer .footer-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.site-footer h4 {
  margin: 0 0 16px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.site-footer p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer .footer-meta {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #f97316);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 55px rgba(99, 102, 241, 0.45);
}

@media (max-width: 768px) {
  .page-article {
    padding: 28px 22px 48px;
  }

  .page-header .header-inner {
    align-items: flex-start;
  }

  .page-header nav {
    width: 100%;
    gap: 12px;
  }
}
