/* ==========================================================================
   快连VPN 官网 · kiualanad.com.cn
   单文件样式：零外部依赖、零 Web Font、移动端优先
   ========================================================================== */

:root {
  --brand-900: #0a1f44;
  --brand-800: #0e2c5e;
  --brand-700: #123f86;
  --brand-600: #1660c4;
  --brand-500: #2b82f0;
  --brand-300: #7db6f7;
  --brand-050: #eef5ff;

  --accent-600: #0e8f86;
  --accent-500: #14b8a6;

  --warn-600: #b45309;
  --warn-050: #fff7ed;

  --danger-600: #b42318;
  --danger-050: #fef3f2;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-soft: #f8fafc;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;

  --shadow-s: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-m: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 10px 20px -8px rgba(15, 23, 42, .12);
  --shadow-l: 0 18px 40px -12px rgba(10, 31, 68, .28);

  --maxw: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .3em 0; }
strong { color: var(--ink-900); }
code, kbd, pre { font-family: var(--mono); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--brand-800);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 布局 ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tint { background: var(--brand-050); }
.section__head { max-width: 760px; margin-bottom: 32px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--brand-600);
  background: var(--brand-050);
  border: 1px solid #d5e4fb;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

h2.section__title { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 10px; }
h3 { font-size: clamp(17px, 2.4vw, 19px); }
.section__lead { color: var(--ink-500); margin-bottom: 0; }

.lead-para { font-size: 17px; color: var(--ink-700); }
.section__more { display: inline-block; margin-top: 10px; font-size: 14.5px; font-weight: 700; color: var(--brand-600); }
.section__more::after { content: " →"; }
.muted { color: var(--ink-500); }
.small { font-size: 14px; line-height: 1.7; }
.tiny { font-size: 13px; color: var(--ink-500); line-height: 1.65; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; }

/* ---------- 顶部提示条 + 导航 ---------- */
.topbar {
  background: var(--brand-900);
  color: #cfe0fb;
  font-size: 13px;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; padding: 7px 0; }
.topbar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.topbar__tag { display: inline-flex; align-items: center; gap: 6px; }
.topbar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-500); flex: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink-900); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--brand-600), var(--brand-500) 55%, var(--accent-500));
  color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 800;
  box-shadow: var(--shadow-s);
}
.brand__sub { font-size: 12px; font-weight: 600; color: var(--ink-500); letter-spacing: .04em; }

.nav-links {
  display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block; padding: 8px 11px; border-radius: var(--radius-s);
  color: var(--ink-700); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.nav-links a:hover { background: var(--brand-050); color: var(--brand-700); text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: linear-gradient(135deg, var(--brand-600), var(--brand-500)); color: #fff; box-shadow: 0 8px 20px -8px rgba(22, 96, 196, .75); }
.btn--primary:hover { box-shadow: 0 12px 26px -10px rgba(22, 96, 196, .85); }
.btn--ghost { background: #fff; color: var(--brand-700); border-color: var(--line-strong); box-shadow: var(--shadow-s); }
.btn--ghost:hover { border-color: var(--brand-500); color: var(--brand-600); }
.btn--onDark { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .34); }
.btn--onDark:hover { background: rgba(255, 255, 255, .2); }
.btn--sm { padding: 7px 14px; font-size: 14px; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 420px at 12% -12%, rgba(43, 130, 240, .32), transparent 62%),
    radial-gradient(760px 380px at 92% 8%, rgba(20, 184, 166, .22), transparent 60%),
    linear-gradient(165deg, var(--brand-900), #0b2550 55%, #081c3b);
  color: #dbe8fb;
  padding: 72px 0 60px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(720px 420px at 50% 20%, #000, transparent 78%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: 44px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; }
.hero h1 { color: #fff; font-size: clamp(28px, 5vw, 46px); letter-spacing: -.01em; margin-bottom: 18px; }
.hero h1 .hl { color: #7fd6ff; }
.hero__lead { font-size: clamp(16px, 2.2vw, 18.5px); color: #d3e3fb; max-width: 60ch; }
.hero__verdict {
  border-left: 3px solid var(--accent-500);
  background: rgba(255, 255, 255, .07);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  padding: 16px 18px;
  margin: 24px 0 28px;
  font-size: 16.5px;
  color: #eaf2ff;
}
.hero__verdict b { color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.hero__stats li { margin: 0; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-m); padding: 12px 14px; }
.hero__stats b { display: block; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.hero__stats span { font-size: 13px; color: #b9cdf0; }

.hero__card {
  background: #fff;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  padding: 22px;
  color: var(--ink-700);
}
.hero__card h2 { font-size: 17px; margin-bottom: 4px; }
.hero__card .tiny { margin-bottom: 14px; display: block; }
.verdict-list { list-style: none; margin: 0; padding: 0; }
.verdict-list li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); margin: 0; font-size: 14.5px; }
.verdict-list li:first-child { border-top: 0; }
.verdict-list b { flex: none; color: var(--accent-600); }
.verdict-list span { color: var(--ink-500); display: block; font-size: 13px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 18px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px;
  box-shadow: var(--shadow-s);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-050); color: var(--brand-600); font-weight: 800; font-size: 15px;
  margin-bottom: 12px;
}
.card__fact { font-size: 13px; color: var(--ink-500); margin-bottom: 10px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--brand-050); color: var(--brand-700); border: 1px solid #d5e4fb;
}
.tag--ok { background: #ecfdf5; color: var(--accent-600); border-color: #c7f0e6; }
.tag--warn { background: var(--warn-050); color: var(--warn-600); border-color: #fcd9b6; }
.tag--off { background: #f1f5f9; color: var(--ink-500); border-color: var(--line); }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; box-shadow: var(--shadow-s); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
caption { caption-side: bottom; text-align: left; padding: 12px 14px; font-size: 13px; color: var(--ink-500); border-top: 1px solid var(--line); background: var(--bg-soft); }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--brand-050); color: var(--brand-800); font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
tbody th { font-weight: 700; color: var(--ink-900); background: #fcfdff; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fcfdff; }
td .mono, th .mono { font-size: 13px; }
td code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }
.center { text-align: center; }

/* ---------- 代码块 ---------- */
pre {
  background: #0b1c33;
  color: #d7e6fb;
  border-radius: var(--radius-m);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0 0 16px;
  box-shadow: var(--shadow-s);
}
pre code { color: inherit; background: none; padding: 0; font-size: inherit; }
pre .c { color: #8ba7cd; }
pre .k { color: #7fd6ff; }
pre .s { color: #8ee6c8; }
.code-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-500); margin-bottom: 8px; }

/* ---------- 步骤条 ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 60px;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand-600), var(--brand-500));
  color: #fff; font-weight: 800; font-size: 17px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(22, 96, 196, .7);
}
.steps > li::after {
  content: "";
  position: absolute; left: 19px; top: 46px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--brand-300), var(--line));
}
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin-bottom: 6px; font-size: 18px; }
.steps__why { font-size: 14px; color: var(--ink-500); margin-bottom: 12px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 46px 16px 18px;
  font-weight: 700;
  color: var(--ink-900);
  font-size: 16.5px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 18px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--brand-600); border-bottom: 2px solid var(--brand-600);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary { border-bottom: 1px solid var(--line); background: var(--brand-050); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq__body { padding: 16px 18px 18px; }
.faq__body p:last-child { margin-bottom: 0; }
.faq__body ul { margin-bottom: 0; }

/* ---------- 信任 / 合规 ---------- */
.trust { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust__box { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-600); border-radius: var(--radius-m); padding: 18px 20px; box-shadow: var(--shadow-s); }
.trust__box--ok { border-left-color: var(--accent-600); }
.trust__box--warn { border-left-color: var(--warn-600); }
.trust__box h3 { font-size: 16px; margin-bottom: 8px; }
.trust__box ul { padding-left: 1.15em; margin-bottom: 0; font-size: 14.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--ink-500); }
.kv dd { margin: 0; color: var(--ink-900); font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--brand-900); color: #b6cbe9; padding: 48px 0 28px; margin-top: 0; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer a { color: #cfe0fb; }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
.footer__grid ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.footer__grid li { margin: 7px 0; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.footer__brand:hover { color: #fff; text-decoration: none; }
.footer__bottom {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: 13px; color: #93aacd;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- 子页面：面包屑 / 页头 ---------- */
.crumbs { padding: 14px 0 0; font-size: 13px; color: var(--ink-500); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; margin: 0; }
.crumbs li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--ink-400); }
.crumbs a { color: var(--ink-500); }
.crumbs a:hover { color: var(--brand-600); }
.crumbs [aria-current="page"] { color: var(--ink-700); font-weight: 600; }

.page-head {
  background:
    radial-gradient(900px 320px at 10% -20%, rgba(43, 130, 240, .3), transparent 60%),
    linear-gradient(165deg, var(--brand-900), #0b2550 60%, #081c3b);
  color: #cfe0fb;
  padding: 8px 0 44px;
}
.page-head h1 { color: #fff; font-size: clamp(24px, 4.2vw, 36px); margin-bottom: 10px; letter-spacing: -.01em; }
.page-head p { color: #d3e3fb; max-width: 72ch; margin-bottom: 0; font-size: clamp(15px, 2vw, 17px); }
.page-head .eyebrow { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #9fc9ff; }
.page-head .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- 子页面：目录 ---------- */
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; box-shadow: var(--shadow-s); }
.toc h2 { font-size: 15px; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.25em; font-size: 14.5px; columns: 2; column-gap: 24px; }
.toc li { margin: 4px 0; break-inside: avoid; }

/* ---------- 提示框 ---------- */
.note { border-left: 4px solid var(--brand-500); background: var(--brand-050); border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 14px 16px; margin: 0 0 18px; }
.note--ok { border-left-color: var(--accent-600); background: #ecfdf5; }
.note--warn { border-left-color: var(--warn-600); background: var(--warn-050); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note__title { font-weight: 700; color: var(--ink-900); display: block; margin-bottom: 4px; }

/* ---------- 前后翻页 ---------- */
.pager { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; box-shadow: var(--shadow-s); }
.pager a:hover { border-color: var(--brand-500); text-decoration: none; }
.pager b { display: block; color: var(--brand-700); font-size: 15px; margin-bottom: 2px; }
.pager span { font-size: 13px; color: var(--ink-500); line-height: 1.5; }
.pager a.is-next { text-align: right; }

/* ---------- 定义列表 ---------- */
.deflist { margin: 0 0 18px; font-size: 14.5px; }
.deflist dt { font-weight: 700; color: var(--ink-900); margin-top: 12px; }
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: 3px 0 0; color: var(--ink-700); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .section { padding: 48px 0; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 44px; }
  .hero__stats { grid-template-columns: 1fr; }
  .steps > li { padding-left: 50px; }
  .steps > li::before { width: 34px; height: 34px; font-size: 15px; }
  .steps > li::after { left: 16px; top: 40px; }
  .brand__sub { display: none; }
  .nav-links { gap: 0; }
  pre { font-size: 12.5px; padding: 14px; }
  .toc ol { columns: 1; }
  .pager { grid-template-columns: 1fr; }
  .page-head { padding: 8px 0 36px; }
}

@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .topbar, .hero__cta, .btn { display: none; }
  body { color: #000; }
}
