:root {
  --bg-deep: #06080C;
  --bg-surface: #0E1118;
  --bg-elevated: #151A24;
  --bg-card: #12161F;
  --text-primary: #E8ECF1;
  --text-secondary: #9AA3B0;
  --accent: #00D26A;
  --accent-hover: #00B85C;
  --border-default: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 210, 106, 0.4);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-max: 1160px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.1rem, 4vw + 0.4rem, 3.2rem);
  text-wrap: balance;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw + 0.2rem, 2.1rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.1rem, 2vw + 0.1rem, 1.35rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 72ch;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

/* Layout Helpers */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.flex-center { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; }
.text-center { text-align: center; }
.mt-lg { margin-top: 2rem; }

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 12, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-default);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.brand img {
  height: 30px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--text-primary);
}

nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 140px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 210, 106, 0.25);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}

th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }

/* FAQ Details */
.faq-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  transition: background 0.2s ease;
}

.faq-summary::-webkit-details-marker { display: none; }
.faq-summary:hover { background: rgba(255, 255, 255, 0.03); }

.faq-summary::after {
  content: "+";
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Links List */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem 1.5rem;
  list-style: none;
}

.link-list li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border-default);
}

.link-list a {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
}

.link-list a:hover { color: var(--accent); }

      .link-desc {
        display: block;
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin-top: 0.25rem;
      }

      .schematic-grid {
        width: 100%;
        max-width: 100%;
      }
      @media (max-width: 480px) {
        .schematic-grid {
          grid-template-columns: 1fr !important;
          height: auto !important;
        }
        .ui-panel {
          min-height: 160px;
        }
      }

      /* SVG Animation Classes */
.svg-orbit { animation: orbit-breathe 8s infinite ease-in-out alternate; transform-box: fill-box; transform-origin: center; }
.svg-orbit-alt { animation: orbit-pulse 12s infinite ease-in-out alternate; transform-box: fill-box; transform-origin: center; }
.svg-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-circle 6s infinite ease-in-out alternate; }

@keyframes orbit-breathe {
  0% { transform: scale(0.96); opacity: 0.5; }
  100% { transform: scale(1.04); opacity: 1; }
}

@keyframes orbit-pulse {
  0% { transform: scale(0.94); opacity: 0.4; }
  100% { transform: scale(1.06); opacity: 0.8; }
}

@keyframes draw-circle {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .svg-orbit, .svg-orbit-alt, .svg-draw {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }
}
