/* Public website + account page. Same-origin only: no web fonts, no external assets. */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eaf1ff;
  --accent: #0891b2;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fff4e0;
  --err: #b91c1c;
  --err-soft: #fdecec;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(15, 23, 42, 0.07);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1020;
    --surface: #111a2f;
    --surface-2: #16213a;
    --text: #e6ebf5;
    --muted: #a0aec5;
    --line: #243250;
    --brand: #5b9bff;
    --brand-hover: #82b2ff;
    --brand-soft: #14274d;
    --accent: #22d3ee;
    --ok: #4ade80;
    --ok-soft: #10281c;
    --warn: #fbbf24;
    --warn-soft: #2e2410;
    --err: #f87171;
    --err-soft: #331618;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, html:lang(en) body { line-height: 1.6; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 22px; margin-inline-start: 12px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.85rem;
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.97rem;
  padding: 11px 22px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #06122b; }
}
.btn-sm { padding: 7px 16px; font-size: 0.9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 22%, transparent), transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600;
  background: var(--brand-soft); color: var(--brand); padding: 6px 14px; border-radius: 999px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 18px 0 18px; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.13rem; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.chips li { font-size: 0.85rem; border: 1px solid var(--line); background: var(--surface); padding: 5px 13px; border-radius: 999px; color: var(--muted); }

.visual { display: grid; place-items: center; }
.visual svg { width: min(380px, 90%); height: auto; overflow: visible; }
.orbit { transform-origin: 200px 200px; animation: spin 40s linear infinite; }
.orbit.rev { animation-duration: 60s; animation-direction: reverse; }
.pulse { animation: pulse 3.2s ease-in-out infinite; transform-origin: 200px 200px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.45; } }
.v-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.v-dash { fill: none; stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 3 9; opacity: 0.6; }
.v-dot { fill: var(--accent); }
.v-shield { fill: var(--brand); }
.v-shield-in { fill: var(--surface); }
.v-check { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.v-pin { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.v-pin-t { fill: var(--text); font-size: 15px; font-weight: 700; font-family: var(--font); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid.f3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.08rem; margin: 14px 0 6px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card > h3:first-child { margin-top: 0; }
.nodes .fine { margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; padding: 0; list-style: none; margin: 0; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 24px 24px; box-shadow: var(--shadow); }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px;
}
@media (prefers-color-scheme: dark) { .steps li::before { color: #06122b; } }
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.plan { text-align: center; padding: 28px 18px; }
.plan .name { font-weight: 700; color: var(--muted); font-size: 0.95rem; }
.plan .days { font-size: 2.6rem; font-weight: 800; line-height: 1.1; margin: 8px 0 2px; color: var(--text); }
.plan .unit { color: var(--muted); font-size: 0.95rem; }
.plan .amount { margin: 14px 0 0; font-size: 1.5rem; font-weight: 800; color: var(--text); }
.plan .per { margin: 2px 0 16px; font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
.plan .price { margin: 16px 0; font-size: 0.9rem; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 6px 10px; }
.notice { margin-top: 22px; text-align: center; color: var(--muted); font-size: 0.93rem; }
.skeleton { height: 220px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- downloads ---------- */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; max-width: 820px; margin-inline: auto; }
.dl h3 { margin-top: 12px; }
.dl .meta { font-size: 0.88rem; color: var(--muted); margin: 6px 0 16px; }
.hash { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.hash code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 4px 8px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.hash button { font: inherit; font-size: 0.8rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 3px 10px; cursor: pointer; }

/* ---------- faq ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 0 16px; font-size: 0.96rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }

/* ---------- account ---------- */
.account { padding: 48px 0 80px; min-height: 70vh; }
.auth-card { max-width: 440px; margin-inline: auto; padding: 32px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 18px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--muted); padding: 9px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.field { display: block; margin-bottom: 16px; }
.field > span:first-child { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
}
.field input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.field small { display: block; color: var(--muted); margin-top: 6px; font-size: 0.82rem; }
.pw { position: relative; display: block; }
.pw input { padding-inline-end: 72px; }
.pw-toggle { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--brand); font: inherit; font-size: 0.85rem; cursor: pointer; padding: 6px 8px; }
.alert { border-radius: 12px; padding: 11px 14px; font-size: 0.92rem; margin-bottom: 16px; }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

.dash-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-head h1 { font-size: 1.6rem; }
.dash-head .who { color: var(--muted); font-size: 0.95rem; word-break: break-all; }
.dash-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.plan-card .big { font-size: 2.8rem; font-weight: 800; line-height: 1.1; margin: 14px 0 2px; }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 14px 0 10px; }
.meter-bar { height: 100%; width: 0; border-radius: 999px; background: var(--ok); transition: width .3s; }
.meter-bar.warn { background: var(--warn); }
.meter-bar.over { background: var(--err); }
.nodes.buy-list { margin-top: 14px; }
.buy-list .name { font-weight: 600; }
.buy-list .meta { color: var(--muted); font-size: 0.85rem; margin-inline-start: 8px; }
.buy-list .price { font-weight: 800; margin-inline-end: 12px; }
.buy-list .right { display: flex; align-items: center; }
#traffic-text { margin: 0; font-weight: 600; }
.plan-card .sub { color: var(--muted); font-size: 0.95rem; }
.plan-card .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.checklist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.checklist li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); }
.checklist li.done::before { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 4px var(--surface); }
.nodes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.nodes li { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: 0.95rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; margin-inline-end: 8px; }
.dot.on { background: #22c55e; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .visual { order: -1; }
  .visual svg { width: min(260px, 70%); }
  .grid.f3, .steps { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .grid.f3, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .section { padding: 52px 0; }
  .nav { gap: 12px; }
  .nav-end .btn { padding: 7px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit, .pulse, .skeleton { animation: none; }
  .btn { transition: none; }
}
