:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #2d3a33;
  --color-accent-hover: #1f2b24;
  --color-focus: #2563eb;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1100px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button, .btn {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

section {
  padding: var(--space-lg) 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background-color var(--transition), transform var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  background-color: var(--color-bg);
  border-color: var(--color-text-muted);
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: 1.1rem;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

nav ul {
  display: flex;
  gap: var(--space-md);
}

nav a {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--color-text-primary);
  font-weight: 500;
}

.footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-sm);
  stroke: var(--color-accent);
  stroke-width: 1.5;
  fill: none;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 500;
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
}

.related-item a {
  display: block;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
}

.related-item a:hover {
  color: var(--color-accent);
}

.details-row {
  border-bottom: 1px solid var(--color-border);
}

details {
  padding: var(--space-sm) 0;
}

summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

details[open] summary::after {
  content: "−";
}

details div {
  padding-top: var(--space-xs);
  color: var(--color-text-secondary);
}

/* SVG Animations */
.svg-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.orbit-group {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes orbital-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

.animate-orbit { animation: orbital-breathe 8s ease-in-out infinite; }
.animate-ring { animation: ring-pulse 6s ease-in-out infinite; }
.animate-draw { animation: draw-stroke 12s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .animate-orbit, .animate-ring, .animate-draw {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: var(--space-xs); }
  nav ul { gap: var(--space-sm); flex-wrap: wrap; justify-content: center; }
  section { padding: var(--space-md) 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}
