/* ===================================================================
   v2ray-org.cn — main stylesheet
   =================================================================== */

:root {
  --bg: #171c26;
  --bg-elev: #1b212c;
  --surface: #202734;
  --surface-2: #252d3c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #dce3ed;
  --text-dim: #a2acbd;
  --text-faint: #6e7989;
  --accent: #5aa9ff;
  --accent-soft: rgba(90, 169, 255, 0.13);
  --green: #3ecf8e;
  --amber: #e0b04f;
  --gray: #6b7280;
  --sans: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC",
          "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  --radius: 8px;
  --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(77, 163, 255, 0.28); }

.mono { font-family: var(--mono); }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dbaff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ header ============ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.site-header.is-scrolled {
  background: rgba(23, 28, 38, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}
.brand-text {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-dim { color: var(--text-faint); font-weight: 400; }

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-nav a.is-active { color: var(--text); }

.header-gh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12.5px;
  transition: border-color 0.15s, color 0.15s;
}
.header-gh:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.header-gh svg { width: 15px; height: 15px; fill: currentColor; }

/* ============ hero ============ */

.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 88px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 900px 480px at 78% 20%, rgba(56, 118, 205, 0.13), transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(52px, 7.5vw, 84px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #eff3f8 30%, #a9b5c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 480px;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn svg { width: 15px; height: 15px; fill: currentColor; }

.btn-primary {
  background: #e9eef5;
  color: #141924;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.32);
}
.btn-primary:hover {
  background: #f8fafc;
  color: #0d1118;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 12px 28px rgba(0, 0, 0, 0.38);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }

.hero-meta {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hero-meta .meta-sep { opacity: 0.5; }
#dlVersion { color: var(--text-dim); }
#dlVersion.is-live { color: var(--green); }

.hero-os-hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-dim);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}
.hero-os-hint a { font-weight: 600; }

/* --- hero panel (仿客户端窗口) --- */

.hero-panel-wrap { perspective: 1200px; }

.hero-panel {
  background: linear-gradient(180deg, rgba(37, 45, 60, 0.92), rgba(27, 33, 44, 0.95));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: rotateX(0) rotateY(0);
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.panel-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.tb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.panel-title {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

.panel-body { padding: 18px 20px 20px; }

.panel-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
}
.panel-status {
  align-items: center;
  color: var(--green);
  font-size: 13px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 6px;
}
.panel-uptime { margin-left: auto; color: var(--text-faint); }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}

.panel-label { width: 52px; color: var(--text-faint); font-size: 12px; }
.panel-value { color: var(--text-dim); font-size: 13px; }
.panel-value b { color: var(--text); font-weight: 600; }

.panel-chart {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  padding: 12px 14px 10px;
}
.panel-chart canvas { display: block; width: 100%; height: 72px; }
.panel-speed {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
}
.panel-speed b { color: var(--text-dim); font-weight: 600; }

/* ============ stats ============ */

.stats { border-bottom: 1px solid var(--line); background: var(--bg-elev); }
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 30px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-label { font-size: 12.5px; color: var(--text-faint); }

/* ============ sections ============ */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-elev); border-block: 1px solid var(--line); }

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-desc {
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 40px;
}

/* ============ steps ============ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 24px 22px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}
.step:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.step-num {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 38px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.07);
  line-height: 1;
}
.step h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 13.5px; margin-bottom: 16px; }
.step-code {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.code-dim { color: var(--text-faint); }

/* ============ client table ============ */

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 6px 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.pill.is-active {
  color: #141924;
  background: #e9eef5;
  border-color: #e9eef5;
  font-weight: 600;
}

.table-search {
  position: relative;
  min-width: 220px;
}
.table-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  fill: var(--text-faint);
  pointer-events: none;
}
.table-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 9px 12px 9px 34px;
  transition: border-color 0.15s;
}
.table-search input::placeholder { color: var(--text-faint); }
.table-search input:focus { outline: none; border-color: var(--accent); }

.client-table {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.ct-head, .ct-row {
  display: grid;
  grid-template-columns: 1.75fr 1.5fr 1.15fr 0.95fr 0.75fr 0.7fr;
  gap: 16px;
  align-items: center;
  padding: 0 20px;
}

.ct-head {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.ct-row {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.15s;
  animation: rowIn 0.35s both;
}
.ct-row:last-child { border-bottom: none; }
.ct-row:hover { background: rgba(255, 255, 255, 0.025); }
.ct-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.15s;
}
.ct-row:hover::before { opacity: 1; }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.ct-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-name-line { display: flex; align-items: center; gap: 8px; }
.ct-name b { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.ct-desc {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-rec {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(77, 163, 255, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  flex: none;
}

.ct-platforms { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 7px;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }

.ct-core { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.ct-license { font-size: 12.5px; color: var(--text-dim); }
.ct-license .paid { color: var(--amber); }

.ct-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.st-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.st-active  .st-dot { background: var(--green); box-shadow: 0 0 6px rgba(62, 207, 142, 0.6); }
.st-active  { color: var(--green); }
.st-slow    .st-dot { background: var(--amber); }
.st-slow    { color: var(--amber); }
.st-stopped .st-dot { background: var(--gray); }
.st-stopped { color: var(--text-faint); }
.st-archived .st-dot { background: var(--gray); }
.st-archived { color: var(--text-faint); }

.ct-right { text-align: right; }
.ct-link {
  justify-self: end;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}
.ct-link.is-none { color: var(--text-faint); cursor: default; }

.ct-empty { padding: 48px 20px; text-align: center; color: var(--text-faint); }
.table-noscript { padding: 24px 20px; color: var(--text-dim); }

.table-count {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: right;
  letter-spacing: 0.04em;
}

/* --- cores strip --- */

.cores {
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 48px;
}
.cores-label {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  align-self: center;
  padding-right: 6px;
}
.core-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s, transform 0.2s;
}
.core-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.core-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.core-desc { font-size: 12px; color: var(--text-faint); line-height: 1.55; }

/* ============ FAQ ============ */

.faq-list { display: flex; flex-direction: column; margin-top: 36px; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 36px 20px 2px;
  font-size: 15.5px;
  font-weight: 600;
  position: relative;
  transition: color 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-faint);
  transition: transform 0.25s, color 0.15s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--accent); }

.faq-body {
  overflow: hidden;
  padding: 0 2px 22px;
  color: var(--text-dim);
  font-size: 14px;
  max-width: 660px;
}
.faq-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}
.faq-item.is-animating .faq-body { animation: faqIn 0.3s ease both; }
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ============ footer ============ */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 56px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer-about p {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
  max-width: 380px;
}
.footer-col { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.footer-head {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.footer-col a { color: var(--text-dim); font-size: 13.5px; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  padding-bottom: 24px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ============ reveal on scroll ============ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ header tools + language switcher ============ */

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-nav { margin-left: auto; }
.site-nav + .header-tools { margin-left: 0; }

.lang-switch { position: relative; }
.ls-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ls-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.ls-btn svg:first-child { width: 15px; height: 15px; fill: currentColor; flex: none; }
.ls-caret { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.7; transition: transform 0.2s; }
.lang-switch.is-open .ls-caret { transform: rotate(180deg); }
.ls-current { white-space: nowrap; }

.ls-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 1px;
  z-index: 120;
}
.lang-switch.is-open .ls-menu { display: flex; }
.ls-opt {
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ls-opt:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.ls-opt.is-active { color: var(--accent); background: var(--accent-soft); }

/* ============ guide cards (homepage + blog index) ============ */

.guides-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.guides-head .section-eyebrow,
.guides-head .section-title { margin-bottom: 12px; }
.guides-head .section-desc { margin-bottom: 0; }
.guides-all { flex: none; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  animation: rowIn 0.4s both;
}
.guide-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  background: var(--surface-2);
  color: var(--text);
}
.gc-tag {
  align-self: flex-start;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(77, 163, 255, 0.25);
  border-radius: 4px;
  padding: 2px 8px;
}
.gc-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.gc-excerpt {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gc-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ============ blog index page ============ */

.blog-main { padding: calc(var(--header-h) + 56px) 0 88px; }
.page-title {
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.blog-main .table-tools { margin-top: 32px; margin-bottom: 26px; }
.blog-main .guide-grid { margin-top: 8px; }

/* ============ article page ============ */

.article-main { padding: calc(var(--header-h) + 40px) 0 80px; }
.wrap-article { max-width: 760px; }

.article-back {
  display: inline-block;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.article-back:hover { color: var(--accent); }

.article-head { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 8px; }
.article-head .gc-tag { margin-bottom: 16px; }
.article-title {
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 16px;
}
.article-lead { font-size: 17px; color: var(--text-dim); line-height: 1.65; margin-bottom: 16px; }
.article-meta { font-size: 12px; color: var(--text-faint); letter-spacing: 0.03em; }

.article-toc {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 18px 22px;
  margin: 28px 0 8px;
}
.toc-head { font-size: 11px; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 10px; }
.article-toc ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.article-toc a { font-size: 13.5px; color: var(--text-dim); }
.article-toc a:hover { color: var(--accent); }

.article-body { padding-top: 22px; font-size: 16px; line-height: 1.85; color: #c9d2df; }
.article-body h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 36px 0 14px;
  padding-top: 6px;
}
.article-body h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-inline-start: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--text-faint); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(77, 163, 255, 0.4); }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}
.article-body pre {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
}
.article-body pre code { background: none; border: none; padding: 0; font-size: 12.5px; line-height: 1.7; }
.article-body blockquote {
  border-inline-start: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 14.5px;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.article-related .section-eyebrow { margin-bottom: 20px; }
.article-related .guide-grid { grid-template-columns: repeat(3, 1fr); }
.article-missing { padding: 60px 0; text-align: center; color: var(--text-dim); font-size: 16px; }

/* ============ RTL (fa) ============ */

[dir="rtl"] .hero-os-hint { border-left: none; border-right: 2px solid var(--accent); padding-left: 0; padding-right: 12px; }
[dir="rtl"] .step-num { right: auto; left: 22px; }
[dir="rtl"] .faq-item summary { padding: 20px 2px 20px 36px; }
[dir="rtl"] .faq-item summary::after { right: auto; left: 6px; }
[dir="rtl"] .ct-row::before { left: auto; right: 0; }
[dir="rtl"] .ct-right { text-align: left; }
[dir="rtl"] .ls-menu { right: auto; left: 0; }
[dir="rtl"] .ls-opt { text-align: right; }
[dir="rtl"] .table-search svg { left: auto; right: 12px; }
[dir="rtl"] .table-search input { padding: 9px 34px 9px 12px; }
[dir="rtl"] .article-body { line-height: 1.95; }
[dir="rtl"] .article-body pre,
[dir="rtl"] .article-body pre code { direction: ltr; text-align: left; }
[dir="rtl"] .article-body code { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] .article-toc a,
[dir="rtl"] .gc-tag,
[dir="rtl"] .gc-excerpt { text-align: right; }
[dir="rtl"] .hero-title { letter-spacing: normal; }
[dir="rtl"] .brand-text,
[dir="rtl"] .mono { direction: ltr; }
[dir="rtl"] .hero-meta,
[dir="rtl"] .panel-speed,
[dir="rtl"] .footer-bottom { direction: rtl; }

/* ============ responsive ============ */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-panel-wrap { max-width: 520px; }
  .site-nav { display: none; }
  .cores { grid-template-columns: 1fr; }
  .cores-label { padding: 0; }
}

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  /* 表格转卡片 */
  .ct-head { display: none; }
  .ct-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name   link"
      "plat   plat"
      "core   core"
      "meta   meta";
    gap: 8px 12px;
    padding: 16px 18px;
  }
  .ct-name { grid-area: name; }
  .ct-platforms { grid-area: plat; }
  .ct-core { grid-area: core; }
  .ct-license { display: inline; }
  .ct-status { display: inline-flex; }
  .ct-meta-mobile {
    grid-area: meta;
    display: flex;
    gap: 14px;
    align-items: center;
  }
  .ct-link { grid-area: link; align-self: start; }
  .table-tools { flex-direction: column; align-items: stretch; }
  .table-search { min-width: 0; }

  .guide-grid,
  .article-related .guide-grid { grid-template-columns: 1fr; }
  .guides-head { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 480px) {
  .section { padding: 72px 0; }
  .hero { padding-top: calc(var(--header-h) + 48px); padding-bottom: 64px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .ls-current { display: none; }
  .ls-btn { padding: 6px 8px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .guide-grid,
  .article-related .guide-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-canvas { display: none; }
}
