/* ============================================
   rem docs — Apple-inspired documentation theme
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Light theme */
  --bg: #fbfbfd;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-bg: rgba(0, 113, 227, 0.06);
  --code-bg: #f5f5f7;
  --code-text: #1d1d1f;
  --terminal-bg: #1c1c1e;
  --terminal-text: #e5e5e7;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --gradient-start: #0071e3;
  --gradient-end: #5856d6;
  --inline-code-bg: rgba(0, 0, 0, 0.05);
  --table-stripe: rgba(0, 0, 0, 0.02);
  --table-border: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #2997ff;
  --accent-hover: #4faaff;
  --accent-bg: rgba(41, 151, 255, 0.08);
  --code-bg: #1c1c1e;
  --code-text: #f5f5f7;
  --terminal-bg: #1c1c1e;
  --terminal-text: #e5e5e7;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(0, 0, 0, 0.72);
  --gradient-start: #2997ff;
  --gradient-end: #bf5af2;
  --inline-code-bg: rgba(255, 255, 255, 0.08);
  --table-stripe: rgba(255, 255, 255, 0.03);
  --table-border: rgba(255, 255, 255, 0.08);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes slideInFromLeft {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.45s; }

.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.7;
  color: var(--text-primary);
}

.nav-logo-icon {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-bg);
}

.nav-link-github svg {
  opacity: 0.7;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--accent-bg);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* --- Hero --- */
.hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center, var(--accent-bg) 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 980px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.25);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  transform: scale(1.02);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* --- Terminal --- */
.terminal {
  background: var(--terminal-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.terminal:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 6px 16px rgba(0, 0, 0, 0.1);
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-right: 44px;
}

.terminal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--terminal-text);
  min-height: 140px;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-prompt {
  color: #27c93f;
  font-weight: 500;
  user-select: none;
}

.terminal-cmd {
  color: #e5e5e7;
}

.terminal-cursor {
  animation: blink 1s infinite;
  color: #e5e5e7;
  font-weight: 300;
}

.terminal-output {
  margin-top: 0.5rem;
  color: rgba(229, 229, 231, 0.7);
  white-space: pre;
  font-size: 0.75rem;
  line-height: 1.6;
}

/* --- Features --- */
.features {
  padding: 6rem 2rem;
}

.features-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.06);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.feature-card code {
  background: var(--inline-code-bg);
  padding: 0.125em 0.375em;
  border-radius: 4px;
  font-size: 0.8em;
}

/* --- Install Section --- */
.install-section {
  padding: 4rem 2rem 6rem;
}

.install-inner {
  max-width: 640px;
  margin: 0 auto;
}

.install-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.install-step {
  margin-bottom: 0;
}

.install-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 0.625rem;
}

.code-block {
  display: flex;
  align-items: center;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
}

.code-block code {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-primary);
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--accent);
  background: var(--accent-bg);
}

.install-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.install-divider::before,
.install-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- CTA Section --- */
.cta-section {
  padding: 4rem 2rem 6rem;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3.5rem 2.5rem;
  box-shadow: var(--card-shadow);
}

.cta-inner h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.625rem;
}

.cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

/* --- Docs Layout --- */
.docs-layout {
  display: flex;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 52px;
  min-height: 100vh;
}

.docs-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 2rem 1.5rem 2rem 2rem;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.sidebar-section h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.sidebar-link {
  display: block;
  font-size: 0.8375rem;
  font-weight: 450;
  color: var(--text-secondary);
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  margin-bottom: 0.125rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--accent-bg);
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-bg);
  font-weight: 550;
}

/* --- Docs Content --- */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem 4rem;
}

.docs-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.docs-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.docs-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --- Docs Body (Markdown Content) --- */
.docs-body h2 {
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-top: 2.75rem;
  margin-bottom: 0.875rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.docs-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.docs-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.625rem;
}

.docs-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.docs-body p {
  margin-bottom: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.docs-body > p:last-child {
  margin-bottom: 0;
}

.docs-body ul, .docs-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.docs-body li {
  margin-bottom: 0.375rem;
  line-height: 1.6;
}

.docs-body li code,
.docs-body p code,
.docs-body td code {
  background: var(--inline-code-bg);
  padding: 0.125em 0.4em;
  border-radius: 5px;
  font-size: 0.85em;
}

.docs-body pre {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.docs-body pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--terminal-text);
}

.docs-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.625rem 1rem;
  margin-bottom: 1rem;
  background: var(--accent-bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
}

.docs-body blockquote p {
  margin-bottom: 0;
}

.docs-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  border: 1px solid var(--table-border);
  border-radius: 8px;
  overflow: hidden;
}

.docs-body th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--table-border);
}

.docs-body td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--table-border);
  vertical-align: top;
}

.docs-body tr:nth-child(even) td {
  background: var(--table-stripe);
}

.docs-body tr:last-child td {
  border-bottom: none;
}

.docs-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

.docs-body strong {
  font-weight: 600;
}

/* --- Docs Footer Nav --- */
.docs-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.docs-nav-link {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.docs-nav-link:hover {
  border-color: var(--border-strong);
  background: var(--accent-bg);
}

.docs-nav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.docs-nav-title {
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--accent);
}

.docs-nav-next {
  text-align: right;
  margin-left: auto;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  background: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

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

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-tagline {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.footer-links {
  display: flex;
  gap: 4rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  font-size: 0.8375rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Architecture Diagram --- */
.arch-diagram {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-layer {
  width: 100%;
  max-width: 560px;
}

.arch-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.arch-arrow {
  color: var(--text-tertiary);
  font-size: 1.125rem;
  line-height: 1;
  padding: 0.375rem 0;
  opacity: 0.5;
}

.arch-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.175rem;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.arch-box:hover {
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow);
}

.arch-full {
  width: 100%;
}

.arch-badge {
  position: absolute;
  top: -0.5rem;
  right: 0.75rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}

.arch-badge-fast {
  background: rgba(39, 201, 63, 0.12);
  color: #27c93f;
  border: 1px solid rgba(39, 201, 63, 0.2);
}

.arch-badge-write {
  background: rgba(255, 159, 10, 0.1);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.2);
}

.arch-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.arch-sublabel {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

.arch-detail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.arch-file {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.675rem;
  color: var(--text-tertiary);
  opacity: 0.7;
}

.arch-system {
  background: var(--bg-secondary);
}

.arch-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.375rem;
  flex-wrap: wrap;
  justify-content: center;
}

.arch-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.675rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--inline-code-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .arch-split {
    grid-template-columns: 1fr;
  }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .docs-sidebar {
    display: none;
  }

  .docs-content {
    padding: 2rem 1.5rem 3rem;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0.25rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 7rem 1.25rem 3rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
  }

  .install-card {
    padding: 1.25rem;
  }

  .code-block {
    flex-direction: column;
    align-items: stretch;
  }

  .code-block code {
    font-size: 0.75rem;
  }

  .docs-content {
    padding: 1.5rem 1rem 2rem;
  }

  .docs-footer {
    flex-direction: column;
  }

  .docs-nav-next {
    text-align: left;
  }
}
