/* Tunneling 官网共用样式（首页、速度看板）。
 *
 * 设计依据：~/Downloads/DESIGN-HANDOFF.md + tunneling-home-dark.html（2026-11-23 深色方案）。
 * 数值照抄设计稿，不要取整。规则摘要：
 *   - 绿色 --win 只表示「Tunneling 先上链」；输的场次用 --muted，不用红色。
 *   - 黄铜色 --link 只用于链接和文字按钮。
 *   - 不用网格底纹、光晕、渐变、圆角卡片、编号卡片、全大写等宽小标签；圆角只给按钮 2px。
 *   - 等宽字体只用于代码、端点地址、签名、方法名。
 *   - 细线分格：父级 gap:1px + 背景 --line，子格背景是所在分区的底色。
 */
:root {
  --bg: #101113;
  --bg-2: #16181b;
  --code: #0b0c0d;
  --line: #2b2e33;
  --line-strong: #57544e;
  --btn-line: #8b877d;
  --text: #f1eee7;
  --body: #c8c4ba;
  --muted: #9c988e;
  --link: #d6ad5c;
  --win: #63d6a4;
  --sans: 'Libre Franklin', 'Franklin Gothic Medium', 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --pad-x: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1, h2, h3, p, dl, dd { margin: 0; }
.mono { font-family: var(--mono); font-size: 13.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ---- 页眉 ---- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px;
}
.brand {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  color: var(--text); text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--text); text-decoration: none; padding: 12px 0; }
.nav a:hover { color: var(--link); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.head-end { display: flex; align-items: center; gap: 8px 20px; }

/* Discord：频道链接还没申请到时只显示图标，不可点（见各页脚本里的 DISCORD_URL）。 */
.discord { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--body); }
.discord:hover { color: var(--text); }
.discord[aria-disabled="true"] { cursor: default; }
.discord[aria-disabled="true"]:hover { color: var(--body); }
.discord svg { width: 22px; height: 22px; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 28px; border: 1px solid var(--btn-line); border-radius: 2px;
  background: none; color: var(--text); text-decoration: none; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn:hover { color: var(--text); border-color: var(--text); }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover { background: #ffffff; border-color: #ffffff; color: var(--bg); }
.btn.sm { min-height: 44px; padding: 0 22px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textbtn {
  min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--link);
  font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.textbtn:hover { color: var(--text); }

/* ---- 信息条 ---- */
.strip { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.strip .wrap {
  padding-top: 9px; padding-bottom: 9px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 32px;
}
.strip .textbtn { min-height: 0; padding: 0; font-size: 13px; }

/* ---- 分区与标题 ---- */
.sec { border-top: 1px solid var(--line); }
.sec.alt { background: var(--bg-2); }
.sec > .wrap { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 44px; }
.h1 { font-weight: 600; font-size: clamp(46px, 7.2vw, 104px); line-height: 1; letter-spacing: -0.025em; text-wrap: balance; }
.h2 { font-weight: 600; font-size: clamp(30px, 3.1vw, 44px); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.h3 { font-size: 18px; font-weight: 600; }
.lede { font-size: 19px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.lead { font-size: 17px; color: var(--body); text-wrap: pretty; }
.note { font-size: 14.5px; color: var(--muted); }
.split { display: flex; flex-wrap: wrap; gap: 20px 72px; }
.split.end { align-items: flex-end; gap: 16px 72px; }
.split > * { flex: 1 1 420px; min-width: 0; }

/* 细线分格 */
.cells { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cells > * { background: var(--bg); }
.sec.alt .cells > * { background: var(--bg-2); }

.figure { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.figure .v { font-weight: 600; font-size: 46px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure .v small { font-size: 20px; letter-spacing: 0; }
.figure .k { font-weight: 600; font-size: 15px; }
.figure .s { font-size: 14px; color: var(--muted); }

.panel { background: var(--bg-2); border: 1px solid var(--line); }
.panel-head {
  padding: 16px 24px; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
}
.panel-head .title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.panel-head h3 { font-size: 17px; font-weight: 600; }
.panel-head a { font-size: 15px; font-weight: 600; padding: 10px 0; }

/* 示例 / 状态小标签：虚线描边，不用颜色 */
.tag { padding: 1px 10px; border: 1px dashed var(--muted); color: var(--body); font-size: 12.5px; font-weight: 600; }

/* ---- 表格 ---- */
.scroll-x { overflow-x: auto; position: relative; }
.tb { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.tb th {
  text-align: left; font-weight: 600; font-size: 13px; color: var(--muted);
  padding: 12px 24px 12px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.tb td { padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body); }
.tb th:last-child, .tb td:last-child { padding-right: 0; }
.panel .tb tbody tr:last-child td { border-bottom: 0; }
.tb .strong { color: var(--text); }
.tb .num { text-align: right; }
.tb .mono { font-size: 13.5px; }
.tb td.mid { vertical-align: middle; }
.win, .tb td.win { color: var(--win); font-weight: 600; }
.loss, .tb td.loss { color: var(--muted); }
.void, .tb td.void { color: var(--muted); }

/* ---- 代码块 ---- */
.code { background: var(--code); border: 1px solid var(--line); min-width: 0; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 8px 0 20px; border-bottom: 1px solid var(--line);
}
.code-head span { font-size: 13px; font-weight: 600; color: var(--muted); }
.code-head .textbtn { padding: 0 12px; font-size: 13px; }
.code pre {
  margin: 0; padding: 22px 20px 26px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--text);
}
.code .c { color: var(--muted); }

/* 定义列表（接口、套餐参数） */
.deflist { display: flex; flex-direction: column; font-size: 15px; }
.deflist > div { display: flex; flex-wrap: wrap; gap: 2px 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.deflist > div:first-child { border-top-color: var(--line-strong); }
.deflist > div:last-child { border-bottom: 1px solid var(--line); }
.deflist dt { flex: 0 0 150px; color: var(--text); }
.deflist dt.mono { font-size: 13.5px; }
.deflist dd { flex: 1 1 180px; color: var(--body); }

/* ---- 页脚 ---- */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.site-foot > .wrap { padding-top: 72px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 56px; }
.foot-cta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 64px; }
.foot-cta h2 {
  flex: 1 1 480px; min-width: 0; color: var(--text);
  font-weight: 600; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance;
}
.foot-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 36px 40px;
  padding-top: 40px; border-top: 1px solid var(--line);
}
.foot-cols > * { display: flex; flex-direction: column; gap: 2px; }
.foot-cols h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.foot-cols a { color: var(--body); text-decoration: none; padding: 5px 0; }
.foot-cols a:hover { color: var(--text); }
.foot-cols .discord-line { display: inline-flex; align-items: center; gap: 10px; }
.foot-cols .discord-line svg { width: 18px; height: 18px; }
.foot-cols a[aria-disabled="true"] { cursor: default; }
.foot-cols a[aria-disabled="true"]:hover { color: var(--body); }
.foot-brand { gap: 12px !important; }
.foot-brand .brand-line { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; font-weight: 700; }
.foot-legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px;
}
.foot-legal p { margin: 0; }

/* ---- 价格分格 ---- */
.plan { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.plan h3 { font-size: 17px; font-weight: 600; }
.plan-price { display: flex; flex-direction: column; gap: 2px; }
.plan-price > span:first-child { font-weight: 600; font-size: 38px; line-height: 1.05; letter-spacing: -0.02em; }
.plan-price small { font-size: 18px; letter-spacing: 0; }
.plan-price > span:last-child { font-size: 14px; color: var(--muted); }
.plan-dl { display: flex; flex-direction: column; font-size: 15px; }
.plan-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.plan-dl > div:last-child { border-bottom: 1px solid var(--line); }
.plan-dl dt { color: var(--muted); }
.plan > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; align-self: flex-start; }

/* ---- 功能分格 ---- */
.feats > div { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 10px; }
.feats h3 { font-size: 19px; font-weight: 600; }
.feats p { font-size: 15px; color: var(--body); }

/* ---- 端点表 ---- */
.ep td { vertical-align: middle; }
.ep td:first-child { color: var(--text); font-weight: 600; }
.ep td:last-child { padding: 0; text-align: right; }
.ep .textbtn { font-size: 14px; }
