/* ── Dunena Documentation Styles ──────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Theme System ───────────────────────────────────── */
:root, [data-theme="dark"] {
  --bg: #080c12; --surface: #0f1318; --surface2: #161b24; --surface3: #1e2535;
  --border: #1f2737; --border2: #283046; --text: #dde4ef; --dim: #6e7f99; --muted: #3d4f68;
  --accent: #6c8cff; --accent2: #a78bfa; --accent3: #38bdf8;
  --accent-glow: rgba(108,140,255,0.13); --accent-glow2: rgba(167,139,250,0.1);
  --green: #34d399; --red: #fb7185; --yellow: #fbbf24; --purple: #c084fc; --cyan: #22d3ee;
  --code-bg: #080c12; --sidebar-w: 268px; --header-h: 60px;
  --grad-hero: linear-gradient(160deg, #080c12 0%, #0d1220 45%, #0a0f1c 100%);
  --grad-card: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.4); --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 36px rgba(108,140,255,0.09);
  --progress-h: 3px;
}
[data-theme="light"] {
  --bg: #f5f7fc; --surface: #ffffff; --surface2: #eef1f8; --surface3: #e4e8f4;
  --border: #dde2ee; --border2: #cdd3e4; --text: #1a2338; --dim: #5a6a8a; --muted: #a0aec0;
  --accent: #4f6bff; --accent2: #8b5cf6; --accent3: #0ea5e9;
  --accent-glow: rgba(79,107,255,0.08); --accent-glow2: rgba(139,92,246,0.06);
  --green: #10b981; --red: #ef4444; --yellow: #f59e0b; --purple: #a855f7; --cyan: #06b6d4;
  --code-bg: #f0f3fa;
  --grad-hero: linear-gradient(160deg, #f5f7fc 0%, #e8edf8 45%, #eff2fc 100%);
  --grad-card: linear-gradient(145deg, #fff 0%, #f5f7fc 100%);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07); --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
  --shadow-glow: 0 0 36px rgba(79,107,255,0.07);
  --progress-h: 3px;
}
/* Fonts */
:root {
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.75; font-size: 15px; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent2); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── Scroll Progress Bar ────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: var(--progress-h); width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--cyan));
  background-size: 200% 100%;
  transition: width 0.1s linear;
  animation: gradient-shift 4s ease infinite;
  pointer-events: none;
}

/* ── Back to Top ────────────────────────────────────── */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 150;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--dim); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── Animations ─────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(108,140,255,0.07); }
  50%       { box-shadow: 0 0 40px rgba(108,140,255,0.16); }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed; top: var(--progress-h); left: 0; right: 0; z-index: 100;
  height: var(--header-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.75rem;
  backdrop-filter: blur(16px) saturate(180%);
  background: rgba(8,12,18,0.82);
  transition: background 0.3s, border-color 0.3s;
}
[data-theme="light"] .site-header { background: rgba(245,247,252,0.88); }
.site-header .logo {
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 0.45rem; letter-spacing: -0.025em;
}
.site-header .logo img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.35rem;
  object-fit: contain;
  box-shadow: 0 0 10px rgba(108,140,255,0.2);
  flex: 0 0 auto;
}
.site-header .logo .wordmark {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(108,140,255,0.3));
}
.site-header .logo:hover { text-decoration: none; }
.site-header nav { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
.site-header nav a {
  color: var(--dim); font-size: 0.84rem; font-weight: 500; transition: color 0.2s;
  padding: 0.3rem 0.5rem; border-radius: 6px;
}
.site-header nav a:hover { color: var(--text); text-decoration: none; background: var(--accent-glow); }
.site-header nav a.active { color: var(--accent); }

/* Docs header search */
.docs-search {
  position: relative;
  width: min(300px, 30vw);
  margin-left: 0.35rem;
}
.docs-search-input {
  width: 100%;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.8rem;
  padding: 0 4.2rem 0 2rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.docs-search-input::placeholder { color: var(--muted); }
.docs-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
  background: var(--surface3);
}
.docs-search-icon {
  position: absolute;
  left: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.8rem;
  pointer-events: none;
}
.docs-search-hint {
  position: absolute;
  right: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 0.09rem 0.34rem;
  line-height: 1.2;
}
.docs-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  z-index: 220;
}
.docs-search-results.hidden { display: none; }
.docs-search-item {
  width: 100%;
  border: 0;
  text-align: left;
  background: transparent;
  color: var(--text);
  padding: 0.48rem 0.58rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}
.docs-search-item:hover,
.docs-search-item.active {
  background: var(--accent-glow);
}
.docs-search-item-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.docs-search-item-meta {
  font-size: 0.66rem;
  color: var(--dim);
}
.docs-search-empty {
  font-size: 0.74rem;
  color: var(--dim);
  padding: 0.6rem 0.7rem;
}

/* Theme toggle button */
.theme-toggle {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; width: 36px; height: 36px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all 0.2s; color: var(--dim); margin-left: 0.5rem;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.06); }

/* ── Sidebar ────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--border); overflow-y: auto;
  padding: 1.5rem 0 3rem; z-index: 50;
  /* hide scrollbar but keep scrollability */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: background 0.3s, border-color 0.3s;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar h4 {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); padding: 0.9rem 1.3rem 0.3rem; margin-top: 0.5rem;
  font-weight: 700;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar a {
  display: block; padding: 0.38rem 1.3rem 0.38rem 1.55rem; font-size: 0.83rem;
  color: var(--dim); border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.2s; font-weight: 450;
  position: relative;
}
.sidebar a:hover {
  color: var(--text); background: var(--accent-glow); text-decoration: none;
  border-left-color: var(--border2);
}
.sidebar a.active {
  color: var(--accent); border-left-color: var(--accent);
  background: var(--accent-glow); font-weight: 600;
  letter-spacing: -0.01em;
}
.sidebar a.active::before {
  content: '';
  position: absolute; left: -1px; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 0 8px rgba(108,140,255,0.4);
}

/* ── Main Content ───────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w); margin-top: var(--header-h);
  padding: 2.75rem 3.5rem 5rem; max-width: 900px;
  animation: fadeIn 0.35s ease;
}
.main.full { margin-left: 0; max-width: 100%; }

/* ── Typography ─────────────────────────────────────── */
.main h1 {
  font-size: 2.15rem; font-weight: 800; margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border); padding-bottom: 0.8rem;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, var(--text) 0%, var(--dim) 120%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.main h2 {
  font-size: 1.35rem; font-weight: 700; margin-top: 3rem; margin-bottom: 0.7rem;
  color: var(--text); letter-spacing: -0.02em;
  padding: 0.55rem 0.9rem;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  display: flex; align-items: center; gap: 0.5rem;
}
.main h3 {
  font-size: 1.02rem; font-weight: 600; margin-top: 1.9rem; margin-bottom: 0.45rem;
  color: var(--text); letter-spacing: -0.01em;
}
.main p { margin-bottom: 1rem; color: var(--text); line-height: 1.8; }
.main ul, .main ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.main li { margin-bottom: 0.3rem; line-height: 1.75; }
.main hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.main blockquote {
  border-left: 3px solid var(--accent2); padding: 0.8rem 1.3rem;
  background: var(--accent-glow2); border-radius: 0 8px 8px 0; margin-bottom: 1.25rem;
  color: var(--dim); font-size: 0.88rem; line-height: 1.7;
}
.main blockquote::before {
  content: '💡'; margin-right: 0.45rem;
}

/* Heading anchor links */
.main h2 .anchor, .main h3 .anchor {
  color: var(--muted); font-size: 0.85em; font-weight: 400;
  opacity: 0; transition: opacity 0.15s;
  margin-left: auto; padding-left: 0.5rem; text-decoration: none;
}
.main h2:hover .anchor, .main h3:hover .anchor { opacity: 1; }
.main h2 .anchor:hover, .main h3 .anchor:hover { color: var(--accent); }

/* ── Code ───────────────────────────────────────────── */
code {
  font-family: var(--mono); font-size: 0.83em;
  background: var(--accent-glow); padding: 0.2em 0.48em;
  border-radius: 5px; color: var(--accent); font-weight: 500;
  border: 1px solid rgba(108,140,255,0.12);
}
pre {
  background: var(--code-bg); border: 1px solid var(--border2);
  border-radius: 12px; margin-bottom: 1.25rem;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s; position: relative;
}
pre:hover { box-shadow: var(--shadow-md); }
pre .pre-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem; background: var(--surface2);
  border-bottom: 1px solid var(--border);
  min-height: 38px;
  gap: 0.6rem;
}
pre .pre-lang {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
pre .pre-dots { display: flex; gap: 5px; }
pre .pre-dots { flex: 0 0 auto; }
pre .pre-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
pre .pre-dots span:nth-child(1) { background: #ff5f57; }
pre .pre-dots span:nth-child(2) { background: #ffbd2e; }
pre .pre-dots span:nth-child(3) { background: #28c840; }
pre code {
  display: block; padding: 1.1rem 1.3rem;
  background: none; border: none; color: var(--text);
  font-size: 0.82rem; font-weight: 400; line-height: 1.6;
  overflow-x: auto;
}
/* Copy button */
.copy-btn {
  position: static;
  margin-left: auto;
  flex: 0 0 auto;
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--dim); border-radius: 7px;
  padding: 0.3rem 0.65rem; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; letter-spacing: 0.02em;
  transition: all 0.2s; line-height: 1.4;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.copy-btn.copied { color: var(--green); border-color: var(--green); background: rgba(52,211,153,0.08); }

/* ── Tables ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 1.25rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.865rem; }
th {
  color: var(--dim); font-weight: 700; font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  background: var(--surface2); position: sticky; top: 0;
}
td code { font-size: 0.79rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
[data-theme="light"] tbody tr:nth-child(even) td { background: rgba(0,0,0,0.018); }
tbody tr { transition: background 0.12s; }
tbody tr:hover td { background: var(--accent-glow); }

/* ── Badges / Tags ──────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2em 0.65em; border-radius: 6px;
  font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  font-family: var(--mono);
}
.badge.get    { background: rgba(52,211,153,0.1);  color: var(--green);  border: 1px solid rgba(52,211,153,0.2);  }
.badge.post   { background: rgba(108,140,255,0.1); color: var(--accent); border: 1px solid rgba(108,140,255,0.2); }
.badge.delete { background: rgba(251,113,133,0.1); color: var(--red);    border: 1px solid rgba(251,113,133,0.2); }
.badge.put    { background: rgba(251,191,36,0.1);  color: var(--yellow); border: 1px solid rgba(251,191,36,0.2);  }
.badge.ws     { background: rgba(192,132,252,0.1); color: var(--purple); border: 1px solid rgba(192,132,252,0.2); }

/* ── Endpoint Cards ─────────────────────────────────── */
.endpoint {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
  position: relative; overflow: hidden;
}
.endpoint::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 3px 0 0 3px;
}
.endpoint:hover { border-color: rgba(108,140,255,0.3); box-shadow: var(--shadow-glow); }
.endpoint-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.4rem; }
.endpoint-head code { font-size: 0.9rem; color: var(--text); background: none; border: none; padding: 0; font-weight: 600; }
.endpoint p { color: var(--dim); font-size: 0.86rem; margin-bottom: 0; }

/* ── Landing Hero ───────────────────────────────────── */
.hero {
  text-align: center; padding: 7rem 2rem 4rem;
  background: var(--grad-hero); position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; right: -50%; bottom: -50%;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(108,140,255,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 25% 85%, rgba(167,139,250,0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 60%, rgba(56,189,248,0.04) 0%, transparent 40%);
  pointer-events: none;
}
/* subtle grid overlay */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(108,140,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,140,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero h1 {
  font-size: 4.2rem; font-weight: 900; border: none; padding: 0; margin-bottom: 0.7rem;
  letter-spacing: -0.045em; position: relative; z-index: 1;
  background: linear-gradient(135deg, var(--text) 0%, var(--dim) 120%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: fadeInUp 0.55s cubic-bezier(0.22,1,0.36,1);
  display: inline-flex; align-items: center; gap: 0.8rem;
}
.hero .hero-logo {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 1rem;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0,0,0,0.32);
  flex: 0 0 auto;
}
.hero .tagline {
  font-size: 1.2rem; color: var(--dim); margin-bottom: 0; max-width: 580px;
  margin-inline: auto; animation: fadeInUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.1s both;
  line-height: 1.65; font-weight: 400; position: relative; z-index: 1;
}
.hero .sub {
  font-size: 0.85rem; color: var(--muted); margin-top: 0.8rem;
  animation: fadeInUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.2s both; position: relative; z-index: 1;
}
.hero-buttons {
  display: flex; gap: 0.9rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap;
  animation: fadeInUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.3s both; position: relative; z-index: 1;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.72rem 1.65rem; border-radius: 10px; font-size: 0.9rem;
  font-weight: 700; cursor: pointer; border: 1px solid transparent;
  transition: all 0.2s; letter-spacing: -0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; box-shadow: 0 4px 20px rgba(108,140,255,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 7px 28px rgba(108,140,255,0.42);
  text-decoration: none; filter: brightness(1.07);
}
.btn-secondary {
  background: var(--surface2); color: var(--text); border-color: var(--border2);
}
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); color: var(--accent); }

/* ── Feature Grid ───────────────────────────────────── */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem; max-width: 1060px; margin: 3.5rem auto; padding: 0 2rem;
}
.feature-card {
  background: var(--grad-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: all 0.25s ease; animation: fadeInUp 0.5s ease both;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  opacity: 0; transition: opacity 0.3s;
  background: linear-gradient(135deg, rgba(108,140,255,0.05), rgba(167,139,250,0.05));
  pointer-events: none;
}
.feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.15s; }
.feature-card:nth-child(4) { animation-delay: 0.2s; }
.feature-card:nth-child(5) { animation-delay: 0.25s; }
.feature-card:nth-child(6) { animation-delay: 0.3s; }
.feature-card:nth-child(7) { animation-delay: 0.35s; }
.feature-card:nth-child(8) { animation-delay: 0.4s; }
.feature-card:nth-child(9) { animation-delay: 0.45s; }
.feature-card:hover {
  border-color: rgba(108,140,255,0.35);
  transform: translateY(-4px); box-shadow: var(--shadow-glow);
}
.feature-card:hover::after { opacity: 1; }
.feature-card h3 {
  font-size: 0.95rem; margin-bottom: 0.45rem; font-weight: 700; letter-spacing: -0.01em;
}
.feature-card p { color: var(--dim); font-size: 0.84rem; margin-bottom: 0; line-height: 1.65; }
.feature-card .icon {
  font-size: 1.45rem; margin-bottom: 0.8rem;
  background: var(--surface3); width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--border2);
}

/* ── Install Block ──────────────────────────────────── */
.install-block { max-width: 660px; margin: 2.5rem auto; text-align: left; }
.install-block pre { border-color: rgba(108,140,255,0.22); animation: pulse-glow 3.5s ease infinite; }

/* ── Architecture Block ─────────────────────────────── */
.arch-section { max-width: 1060px; margin: 5rem auto; padding: 0 2rem; }
.arch-section h2 { text-align: center; border: none; padding-left: 0; background: none; -webkit-text-fill-color: var(--text); }
.arch-diagram {
  background: var(--grad-card); border: 1px solid var(--border2);
  border-radius: 14px; padding: 2rem 2.5rem; margin-top: 1.5rem;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.9;
  text-align: center; color: var(--dim); box-shadow: var(--shadow-sm);
}
.arch-diagram span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 700;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  text-align: center; padding: 2.5rem 2rem; color: var(--dim);
  font-size: 0.8rem; border-top: 1px solid var(--border); margin-top: 4rem;
  display: flex; flex-direction: column; gap: 0.75rem; align-items: center;
}
.site-footer .footer-links {
  display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center;
}
.site-footer .footer-links a {
  color: var(--muted); font-size: 0.78rem; transition: color 0.2s;
}
.site-footer .footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 1.5rem 1.1rem 3rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero { padding: 4rem 1rem 2.5rem; }
  .features { grid-template-columns: 1fr; padding: 0 1rem; }
  .site-header nav { gap: 0.45rem; }
  .site-header nav a { font-size: 0.75rem; }
  .site-header .logo img { width: 1.35rem; height: 1.35rem; }
  .hero .hero-logo { width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; }
  .docs-search { width: 170px; }
  .docs-search-hint { display: none; }
  #back-to-top { bottom: 1rem; right: 1rem; }
}

@media (max-width: 540px) {
  .docs-search {
    position: fixed;
    top: calc(var(--progress-h) + 8px);
    left: 0.75rem;
    right: 3.45rem;
    width: auto;
    z-index: 180;
  }
  .site-header {
    padding-top: 42px;
    height: calc(var(--header-h) + 42px);
    align-items: flex-start;
  }
  .main { margin-top: calc(var(--header-h) + 42px); }
}
