/* clashforwindows.cyou — single-accent dark theme */

:root {
  --bg: #0e1424;
  --bg-soft: #111a2e;
  --panel: #17223a;
  --panel-2: #1e2b47;
  --border: rgba(158, 175, 205, 0.18);
  --border-strong: rgba(158, 175, 205, 0.32);
  --text: #edf1f8;
  --muted: #a5b1c7;
  --accent: #4e86e6;
  --accent-strong: #7aa5f0;
  --accent-dim: rgba(78, 134, 230, 0.16);
  --ok: #46b06c;
  --warn: #d0a03c;
  --bad: #d05c4a;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.9em; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 0.5em; font-weight: 650; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 8px; font-size: 14.5px; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.main-nav a[aria-current] { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 6px 8px; cursor: pointer; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 7px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); padding: 6px 12px; font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.lang-btn:hover { color: var(--text); border-color: var(--border-strong); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 150px; padding: 6px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  display: none; flex-direction: column;
}
.lang-menu.open { display: flex; }
.lang-menu a { color: var(--muted); padding: 8px 12px; border-radius: 7px; font-size: 14px; }
.lang-menu a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.lang-menu a[aria-current] { color: var(--accent-strong); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 9px; border: 1px solid transparent;
  padding: 11px 22px; font-size: 15px; font-weight: 550; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-sm { padding: 7px 16px; font-size: 14px; }
.btn-xs { padding: 4px 12px; font-size: 12.5px; border-radius: 7px; }

.text-link { font-size: 14px; }
.eyebrow {
  color: var(--accent-strong); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px;
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; text-align: center; }
.hero-glow {
  position: absolute; inset-inline-start: 50%; top: -220px;
  width: 780px; height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(74, 128, 216, 0.22), transparent);
  pointer-events: none;
}
.rtl .hero-glow { transform: translateX(50%); }
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(34px, 5.2vw, 54px); letter-spacing: -0.02em; margin-bottom: 18px; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin: 30px 0 0; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; gap: 0; margin-top: 56px;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(17, 25, 39, 0.6); max-width: 760px; margin-inline: auto;
}
.stat { flex: 1; padding: 18px 10px; }
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat strong { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section h2 { font-size: clamp(26px, 3.4vw, 34px); text-align: center; }
.section-sub { color: var(--muted); text-align: center; max-width: 620px; margin: 0 auto 44px; }

/* ---------- steps ---------- */
.steps-grid { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.steps-list { display: flex; flex-direction: column; gap: 12px; }
.step-btn {
  display: flex; gap: 14px; align-items: flex-start; text-align: start;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; color: var(--text); font-family: inherit; font-size: 15px;
}
.step-btn:hover { border-color: var(--border-strong); }
.step-btn.active { border-color: var(--accent); background: var(--accent-dim); }
.step-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--border-strong); font-size: 13.5px; font-weight: 600;
}
.step-btn.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-meta strong { display: block; margin-bottom: 2px; }
.step-meta span { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: block; }
.steps-panes {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px; min-height: 300px;
}
.step-pane { display: none; }
.step-pane.active { display: block; }
.step-pane > p { margin-top: 0; color: var(--muted); }
.step-pane .text-link { display: inline-block; margin-top: 16px; }

.mock { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-top: 18px; }
.mock-file { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.mock-file code { color: var(--text); font-size: 13px; display: block; }
.mock-sub { font-size: 12.5px; }
.mock-progress { height: 6px; border-radius: 3px; background: var(--panel-2); margin-top: 14px; overflow: hidden; }
.mock-progress i { display: block; height: 100%; width: 72%; background: var(--accent); border-radius: 3px; animation: fill 2.4s ease-in-out infinite alternate; }
@keyframes fill { from { width: 34%; } to { width: 92%; } }
.mock-input {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 8px 8px 14px;
}
.mock-input span { color: var(--muted); font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.mock-input button { flex: none; background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 6px 14px; font-size: 12.5px; font-family: inherit; }
.mock-profile { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; }
.mock-ok { justify-content: flex-start; color: var(--muted); font-size: 13.5px; }

/* toggle switch */
.toggle {
  width: 40px; height: 22px; border-radius: 11px; flex: none;
  background: var(--panel-2); border: 1px solid var(--border-strong);
  position: relative; cursor: pointer; padding: 0; transition: background 0.18s;
}
.toggle i {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform 0.18s, background 0.18s;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on i { transform: translateX(18px); background: #fff; }

/* ---------- dashboard mock ---------- */
.dash-window {
  border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden;
  background: var(--bg-soft); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-width: 960px; margin: 0 auto;
}
.dash-titlebar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--border-strong); }
.dash-title { margin-left: 10px; color: var(--muted); font-size: 12.5px; }
.dash-body { display: flex; min-height: 440px; }
.dash-side {
  flex: none; width: 168px; padding: 12px 8px;
  border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px;
  background: rgba(17, 25, 39, 0.5);
}
.dash-tab {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; border-radius: 8px; color: var(--muted);
  padding: 9px 12px; font-size: 13.5px; font-family: inherit; cursor: pointer; text-align: left;
}
.dash-tab:hover { color: var(--text); background: var(--panel-2); }
.dash-tab.active { color: var(--text); background: var(--accent-dim); }
.dash-tab.active svg { color: var(--accent-strong); }
.dash-main { flex: 1; padding: 18px 20px; min-width: 0; }
.dash-pane { display: none; }
.dash-pane.active { display: block; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.dstat { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; }
.dstat span { color: var(--muted); font-size: 12px; display: block; }
.dstat strong { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.dash-chart { width: 100%; height: 140px; display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; }
.dash-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.dash-toggles { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 6px 14px; }
.dash-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13.5px; }
.dash-toggle-row + .dash-toggle-row { border-top: 1px solid var(--border); }
.dash-mode { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; }
.dash-mode-label { font-size: 13.5px; color: var(--muted); display: block; margin-bottom: 8px; }
.dash-mode-desc { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; line-height: 1.55; }

.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.seg-btn {
  background: none; border: 0; border-radius: 6px; color: var(--muted);
  padding: 5px 14px; font-size: 13px; font-family: inherit; cursor: pointer;
}
.seg-btn.active { background: var(--accent); color: #fff; }
.seg-sm .seg-btn { padding: 3px 10px; font-size: 12px; }

.dash-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.proxy-group { margin-bottom: 16px; }
.proxy-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.proxy-group-head h4 { margin: 0; font-size: 14.5px; }
.proxy-type { color: var(--muted); font-size: 11.5px; font-weight: 400; font-family: var(--mono); margin-left: 6px; }
.proxy-auto { color: var(--accent-strong); font-size: 13px; font-family: var(--mono); }
.node-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.node-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; text-align: left; font-family: inherit; color: var(--text);
  display: flex; flex-direction: column; gap: 2px;
}
.node-card:hover { border-color: var(--border-strong); }
.node-card.selected { border-color: var(--accent); background: var(--accent-dim); }
.node-name { font-size: 13px; font-weight: 550; }
.node-proto { color: var(--muted); font-size: 11px; }
.node-lat { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 3px; }
.node-lat.ok { color: var(--ok); }
.node-lat.mid { color: var(--warn); }
.node-lat.bad { color: var(--bad); }
.node-card.testing .node-lat { color: var(--muted); }
.node-card.disabled { opacity: 0.45; pointer-events: none; }

.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-card { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 14px; cursor: pointer; }
.profile-card.in-use { border-color: var(--accent); }
.profile-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.profile-badge { color: var(--accent-strong); font-size: 11.5px; }
.profile-meta { color: var(--muted); font-size: 12px; margin: 6px 0; }
.profile-usage { height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin: 8px 0 4px; }
.profile-usage i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.profile-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.profile-updated { color: var(--muted); font-size: 11.5px; }

.conn-head, .log-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.conn-head .dash-note, .log-head .dash-note { margin: 0; }
.conn-table-wrap { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.conn-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.conn-table th {
  text-align: left; color: var(--muted); font-weight: 550; padding: 8px 12px;
  background: var(--panel); border-bottom: 1px solid var(--border); font-size: 11.5px;
}
.conn-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 12px; }
.conn-table tr:last-child td { border-bottom: 0; }
.conn-table td:nth-child(2) { color: var(--muted); }
.conn-chain-proxy { color: var(--accent-strong); }
.conn-chain-direct { color: var(--ok); }
.conn-row-new td { animation: connIn 0.4s ease; }
@keyframes connIn { from { background: var(--accent-dim); } to { background: transparent; } }

.log-list {
  border: 1px solid var(--border); border-radius: 9px; background: var(--panel);
  height: 300px; overflow-y: auto; padding: 10px 14px;
  font-family: var(--mono); font-size: 12px; line-height: 1.8;
}
.log-line { white-space: nowrap; }
.log-time { color: var(--muted); }
.log-level-info { color: var(--accent-strong); }
.log-level-warning { color: var(--warn); }
.log-level-debug { color: var(--muted); }

.dash-caption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------- map ---------- */
.map-wrap {
  position: relative; border: 1px solid var(--border); border-radius: 12px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(74, 128, 216, 0.08), transparent 60%), var(--bg-soft);
  overflow: hidden;
}
.map-svg { display: block; width: 100%; height: auto; }
.map-node { cursor: pointer; }
.map-dot { fill: var(--accent-strong); }
.map-dot.home { fill: #e7ecf4; }
.map-halo { fill: rgba(74, 128, 216, 0.18); transition: fill 0.2s; }
.map-halo.home { fill: rgba(231, 236, 244, 0.15); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { opacity: 0.9; } 70% { opacity: 0.3; } 100% { opacity: 0.9; } }
.map-node text, .map-home text {
  fill: var(--muted); font-size: 12px; text-anchor: middle; font-family: var(--font);
  paint-order: stroke; stroke: rgba(11, 15, 23, 0.8); stroke-width: 3px;
}
.map-node:hover .map-halo { fill: rgba(74, 128, 216, 0.32); }
.map-node.selected .map-dot { fill: #fff; }
.map-node.selected .map-halo { fill: rgba(74, 128, 216, 0.4); }
.map-node.selected text { fill: var(--text); }
.map-arc {
  fill: none; stroke: var(--accent-strong); stroke-width: 1.6;
  stroke-dasharray: 6 7; animation: dashmove 1.1s linear infinite; opacity: 0.9;
}
.map-arc.hidden { display: none; }
@keyframes dashmove { to { stroke-dashoffset: -13; } }
.map-packet { fill: #fff; }
.map-panel {
  position: absolute; inset-inline-end: 18px; top: 18px; width: 220px;
  background: rgba(17, 25, 39, 0.92); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 14px 16px; backdrop-filter: blur(6px);
}
.map-panel h4 { margin: 0 0 10px; font-size: 15px; }
.map-panel dl { margin: 0; }
.map-panel dl div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.map-panel dt { color: var(--muted); }
.map-panel dd { margin: 0; font-family: var(--mono); font-size: 12.5px; }
.map-hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; line-height: 1.5; }

/* ---------- features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px;
}
.feature-card:hover { border-color: var(--border-strong); }
.feature-icon {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--accent-dim); margin-bottom: 14px;
}
.feature-icon svg { width: 21px; height: 21px; fill: none; stroke: var(--accent-strong); stroke-width: 1.7; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 13.8px; margin: 0; line-height: 1.6; }

/* ---------- download ---------- */
.dl-featured {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(135deg, #2f66c4, #4e86e6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px; padding: 28px 32px; margin-bottom: 26px;
  box-shadow: 0 18px 44px rgba(47, 102, 196, 0.35);
  flex-wrap: wrap;
}
.dl-featured-info { min-width: 0; }
.dl-featured-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-featured-head svg { color: #fff; flex: none; }
.dl-featured h3 { margin: 0; font-size: 22px; color: #fff; }
.dl-featured .pkg-badge { background: rgba(255, 255, 255, 0.22); color: #fff; }
.dl-featured-note { color: rgba(255, 255, 255, 0.88); font-size: 14.5px; margin: 10px 0 8px; }
.dl-featured .pkg-file { color: rgba(255, 255, 255, 0.66); font-size: 12.5px; }
.btn-download {
  background: #fff; color: #2c5cb0; font-size: 16.5px; font-weight: 650;
  padding: 15px 32px; border-radius: 11px; flex: none;
  box-shadow: 0 6px 18px rgba(10, 30, 70, 0.25);
}
.btn-download:hover { background: #eef4ff; color: #2c5cb0; }
.dl-featured.recommended { outline: 2px solid rgba(255, 255, 255, 0.55); outline-offset: 3px; }
.dl-others-title {
  color: var(--muted); font-size: 14px; font-weight: 600; margin: 0 0 14px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.detect-bar {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--accent-dim); border: 1px solid rgba(74, 128, 216, 0.35); border-radius: 9px;
  color: var(--text); font-size: 14px; padding: 11px 18px; margin: 0 auto 26px; max-width: 640px;
}
.detect-bar svg { color: var(--accent-strong); flex: none; }
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pkg-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.pkg-card.recommended { border-color: var(--accent); background: linear-gradient(180deg, rgba(74, 128, 216, 0.10), transparent 70%), var(--panel); }
.pkg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.pkg-badge { color: #fff; background: var(--accent); border-radius: 5px; font-size: 11px; padding: 2px 8px; flex: none; }
.pkg-file { color: var(--muted); font-size: 12px; word-break: break-all; }
.pkg-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.pkg-arch { color: var(--muted); font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; }
.dl-notes { margin-top: 30px; color: var(--muted); font-size: 13.5px; max-width: 760px; margin-inline: auto; text-align: center; }
.dl-notes p { margin: 6px 0; }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 34px; }
.faq-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; }
.faq-item summary {
  cursor: pointer; padding: 16px 0; font-weight: 550; font-size: 15.5px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-size: 19px; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.9fr 1.3fr; gap: 32px; padding: 48px 24px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; line-height: 1.6; }
.footer-col h3 { font-size: 13.5px; color: var(--text); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: 13.5px; padding: 3px 0; }
.footer-col a:hover { color: var(--text); }
.footer-note p { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 22px;
  color: var(--muted); font-size: 12.5px;
}

/* ---------- docs ---------- */
.docs-hero { padding: 56px 0 34px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.docs-hero h1 { font-size: clamp(28px, 4vw, 38px); }
.docs-hero .lead { margin: 0 0 26px; max-width: 640px; }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.docs-search {
  display: flex; align-items: center; gap: 10px; max-width: 520px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 14px;
}
.docs-search:focus-within { border-color: var(--accent); }
.docs-search svg { color: var(--muted); flex: none; }
.docs-search input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--text);
  font-size: 15px; font-family: inherit; padding: 12px 0;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); padding: 6px 16px; font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.docs-list-section { padding: 44px 0 84px; }
.docs-count { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.docs-grid-3 { grid-template-columns: repeat(3, 1fr); }
.doc-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; color: var(--text); display: flex; flex-direction: column; gap: 8px;
}
.doc-card:hover { border-color: var(--accent); text-decoration: none; }
.doc-card h3 { font-size: 15.5px; margin: 0; line-height: 1.45; }
.doc-card p { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.6; flex: 1; }
.doc-tag {
  align-self: flex-start; font-size: 11.5px; border-radius: 5px; padding: 2px 9px;
  background: var(--accent-dim); color: var(--accent-strong);
}
.doc-meta { color: var(--muted); font-size: 12px; }
.docs-empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- article ---------- */
.article { padding: 48px 0 72px; }
.article h1 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 14px; }
.article-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; margin-bottom: 30px; }
.article-toc {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 22px; margin-bottom: 30px;
}
.article-toc h2 { font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.article-toc ol { margin: 0; padding-inline-start: 20px; }
.article-toc li { font-size: 14px; padding: 2.5px 0; }
.article-body { font-size: 15.5px; }
.article-body h2 {
  font-size: 21px; margin: 40px 0 14px; padding-top: 22px; border-top: 1px solid var(--border);
}
.article-body h3 { font-size: 17px; margin: 26px 0 10px; }
.article-body p { margin: 0 0 14px; color: #c6cdd9; }
.article-body ul, .article-body ol { color: #c6cdd9; padding-inline-start: 24px; margin: 0 0 14px; }
.article-body li { margin: 5px 0; }
.article-body code {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-size: 13px; color: var(--accent-strong);
}
.article-body pre {
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  padding: 16px 18px; overflow-x: auto; margin: 0 0 16px; direction: ltr; text-align: left;
}
.article-body pre code { background: none; border: 0; padding: 0; color: #cdd6e4; font-size: 13px; line-height: 1.7; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: start; }
.article-body th { background: var(--panel); }
.article-body td { color: #c6cdd9; }
.article-body .note {
  background: var(--accent-dim); border: 1px solid rgba(74, 128, 216, 0.35);
  border-radius: 9px; padding: 12px 16px; margin: 0 0 16px; font-size: 14px; color: #c6cdd9;
}
.article-body .note strong { color: var(--text); }
.article-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 44px 0 0; }
.pager-link {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; color: var(--text); display: flex; flex-direction: column; gap: 3px;
}
.pager-link:hover { border-color: var(--accent); text-decoration: none; }
.pager-link span { color: var(--muted); font-size: 12.5px; }
.pager-link strong { font-size: 14px; font-weight: 550; }
.pager-next { text-align: end; }
.article-related { margin-top: 52px; }
.article-related > h2 { font-size: 19px; margin-bottom: 16px; }
.article-back { margin-top: 36px; text-align: center; }

/* ---------- 404 ---------- */
.nf-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.nf-wrap img { border-radius: 16px; margin-bottom: 18px; }
.nf-code { color: var(--accent-strong); font-family: var(--mono); font-size: 15px; letter-spacing: 0.2em; margin: 0 0 6px; }
.nf-wrap h1 { font-size: 30px; }
.nf-wrap .lead { max-width: 460px; margin-bottom: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-grid, .docs-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .node-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .map-panel { position: static; width: auto; margin: 0 14px 14px; }
}
@media (max-width: 720px) {
  .main-nav {
    display: none; position: absolute; top: 60px; inset-inline: 0;
    flex-direction: column; background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .hero { padding: 64px 0 48px; }
  .hero-stats { flex-wrap: wrap; }
  .stat { flex: 1 1 40%; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--border); }
  .section { padding: 56px 0; }
  .dash-body { flex-direction: column; min-height: 0; }
  .dash-side { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .dash-tab span { white-space: nowrap; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-controls { grid-template-columns: 1fr; }
  .node-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .features-grid, .pkg-grid, .docs-grid, .docs-grid-3 { grid-template-columns: 1fr; }
  .dl-featured { flex-direction: column; align-items: stretch; text-align: center; padding: 24px 20px; }
  .dl-featured-head { justify-content: center; }
  .btn-download { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .article-pager { grid-template-columns: 1fr; }
  .conn-table th:nth-child(2), .conn-table td:nth-child(2) { display: none; }
}

/* ---------- RTL tweaks ---------- */
.rtl .dash-side { border-right: 0; }
.rtl .step-btn, .rtl .node-card { text-align: right; }
[dir="ltr"] .dash-tab { text-align: left; }
