/* 大翻墙运动 — v2.end-gfw.com
   No web fonts or CDNs: everything loads from this domain (third-party hosts are
   often slow or blocked for the people this site is for). */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #0f1b2d;
  --muted: #5b6b82;
  --line: #dde4ee;
  --accent: #0b5cff;
  --accent-ink: #ffffff;
  --accent-soft: #e6eeff;
  --ok: #0f8a4b;
  --ok-soft: #e3f5ec;
  --warn: #a15c00;
  --warn-soft: #fff3df;
  --danger: #c8322b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --wrap: 1120px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2c;
    --surface-2: #17223a;
    --text: #e8eef8;
    --muted: #93a3bb;
    --line: #22304b;
    --accent: #5b8cff;
    --accent-ink: #06122b;
    --accent-soft: #16244a;
    --ok: #3ccf87;
    --ok-soft: #0f2c21;
    --warn: #f0b04a;
    --warn-soft: #2e230f;
    --danger: #ff6b63;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.brand-mark .crack { stroke: var(--danger); stroke-width: 2.4; }
.menu summary { list-style: none; cursor: pointer; display: none; width: 40px; height: 40px; border-radius: 10px; padding: 10px 9px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
/* Desktop shows .nav-desktop; phones get the collapsible menu (a closed <details>
   never renders its content, so desktop cannot reuse it) */
.menu { display: none; }
@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .menu { display: block; }
  .menu summary { display: block; }
  .menu[open] summary { background: var(--surface-2); }
  .menu[open] > nav {
    position: absolute; left: 0; right: 0; top: 60px;
    flex-direction: column; padding: 8px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav a { padding: 12px; font-size: 1rem; }
}

/* sections */
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.page-head { padding: 40px 0 8px; }
.page-head p { color: var(--muted); max-width: 720px; }

/* hero */
.hero { padding: 64px 0 40px; background: radial-gradient(1000px 400px at 80% -10%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-card { padding: 22px; }
.hero-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.hero-card li { display: flex; gap: 12px; align-items: flex-start; }
.hero-card li b { display: block; }
.dot { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.feature { padding: 20px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .input { flex: 1 1 260px; }

/* status messages */
.notice { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: .95rem; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.notice:empty { display: none; }

/* plans */
.plan { padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan .badge { position: absolute; top: -11px; left: 20px; }
.plan .speed { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.plan .speed small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan .price { font-size: 1.1rem; }
.plan .price b { font-size: 1.5rem; }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .92rem; }
.plan .btn { margin-top: auto; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.badge.soft { background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* subscription */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kv > div { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.kv dt { font-size: .82rem; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; word-break: break-all; }
.link-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.link-row:first-child { border-top: 0; }
.link-row code { font-size: .85rem; word-break: break-all; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
@media (max-width: 620px) { .link-row { grid-template-columns: 1fr auto; } .link-row .label { grid-column: 1 / -1; } }

/* downloads */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.app { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.app-head { display: flex; gap: 12px; align-items: center; }
.app-head img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: var(--surface-2); }
.app-head h3 { margin: 0; }
.app p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.app .meta { font-size: .82rem; color: var(--muted); }
.app .row { margin-top: auto; }
.stars { color: #f5a623; letter-spacing: 1px; }

/* news and tweets */
.feed { display: grid; gap: 14px; }
.item { padding: 18px; display: grid; gap: 8px; }
.item-meta { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.item h3 { margin: 0; font-size: 1.08rem; }
.item p { margin: 0; color: var(--text); white-space: pre-line; }
.item .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.item .thumbs img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--surface-2); }
.pager { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.skeleton { height: 96px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* faq */
.faq details { padding: 4px 18px; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details > div { padding: 0 0 14px; color: var(--muted); }

/* steps */
.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }

/* footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 20px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid a { display: block; color: var(--muted); padding: 3px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-brand { font-weight: 700; margin-bottom: 6px; }
.footer-title { font-weight: 600; margin-bottom: 6px; }
.footer-note { margin-top: 20px; font-size: .82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow); z-index: 20; }
.hidden { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.input-sm { width: auto; min-height: 36px; padding: 6px 12px; }
.input-sm.search { width: 100%; max-width: 260px; }
.tabs-inline { margin: 0; }
.row-center { justify-content: center; }

/* --- free subscription and nodes (home page) */
.sub-card h3 { margin: 0 0 12px; font-size: 1.02rem; }
.copy-box { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.copy-box:hover { border-color: var(--accent); }
.copy-box code { display: block; font-size: .82rem; word-break: break-all; line-height: 1.5; max-height: 7.5em; overflow: hidden; }
.copy-hint { display: block; margin-top: 6px; font-size: .78rem; color: var(--accent); font-weight: 600; }
.qr { width: 168px; margin: 14px auto 0; background: #fff; border-radius: 10px; padding: 6px; }
.qr:empty { display: none; }
.qr svg { display: block; width: 100%; height: auto; }
.node-card .item-meta { margin-bottom: 10px; }
.qr-toggle { margin-top: 10px; }
.qr-toggle summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 600; }
.qr-toggle .qr { width: 220px; }
.support { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 28px; flex-wrap: wrap; }
.support > div:first-child { flex: 1 1 420px; }
.support h2 { margin: 6px 0 8px; }
.support-actions { display: flex; gap: 10px; flex-wrap: wrap; }
