:root {
  --bg: #0a0b0e;
  --bg-2: #101217;
  --panel: #14161c;
  --panel-2: #1a1d24;
  --line: rgba(232, 222, 200, 0.09);
  --line-2: rgba(232, 222, 200, 0.16);
  --text: #e8e4d9;
  --muted: #948f83;
  --faint: #5f5b53;
  --gold: #c8a45e;
  --gold-soft: rgba(200, 164, 94, 0.14);
  --ok: #6dbba5;
  --weak: #d7a648;
  --dead: #c9705f;
  --na: #77746c;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans CJK SC", "WenQuanYi Zen Hei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(200, 164, 94, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(109, 187, 165, 0.045), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.75 var(--sans);
  letter-spacing: 0.01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
::selection { background: var(--gold-soft); color: var(--text); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 11, 14, 0.72);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; letter-spacing: 0.12em; }
.brand .sigil {
  width: 26px; height: 26px; border: 1px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center; color: var(--gold); font-size: 12px; letter-spacing: 0;
}
.nav { display: flex; gap: 22px; font-size: 14.5px; color: var(--muted); }
.nav a.on { color: var(--text); }
.spacer { flex: 1; }
.top .act { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.member-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); display: inline-block; margin-right: 6px; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  padding: 9px 18px; border-radius: 999px; font: inherit; font-size: 14.5px; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #17140d; font-weight: 600; }
.btn.gold:hover { background: #d8b673; color: #17140d; }
.btn.sm { padding: 6px 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
button.link:hover { color: var(--gold); }

input, select {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 11px 14px; font: inherit; outline: none; transition: border-color .2s;
}
input:focus, select:focus { border-color: var(--gold); }
label { display: block; font-size: 13.5px; color: var(--muted); margin: 14px 0 6px; }
.code-input { font-family: var(--mono); letter-spacing: 0.18em; text-transform: uppercase; text-align: center; font-size: 18px; }

.flash { margin: 18px 0 0; padding: 12px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--gold);
  border-radius: 10px; background: var(--panel); font-size: 14.5px; }

/* ---------- hero ---------- */
.hero { padding-top: 96px; padding-bottom: 72px; text-align: center; }
.eyebrow { font-size: 12.5px; letter-spacing: 0.32em; color: var(--gold); text-transform: uppercase; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 6vw, 60px); line-height: 1.25;
  margin: 18px 0 18px; letter-spacing: 0.06em; }
.hero p.lead { color: var(--muted); max-width: 620px; margin: 0 auto 34px; font-size: 17px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.ledger { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r);
  margin: 56px auto 0; max-width: 760px; overflow: hidden; }
.ledger div { padding: 18px 10px; border-right: 1px solid var(--line); }
.ledger div:last-child { border-right: 0; }
.ledger b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.ledger span { font-size: 12.5px; color: var(--muted); letter-spacing: 0.1em; }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0; letter-spacing: 0.06em; }
.section-title a { font-size: 14px; color: var(--muted); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: rgba(20, 22, 28, 0.6); }
.step .n { font-family: var(--serif); color: var(--gold); font-size: 14px; letter-spacing: 0.2em; }
.step h3 { margin: 8px 0 6px; font-size: 17px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 18px;
  background: linear-gradient(180deg, rgba(26, 29, 36, 0.75), rgba(20, 22, 28, 0.55));
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(200, 164, 94, 0.45); transform: translateY(-2px); color: inherit; }
.card .no { font-family: var(--serif); color: var(--faint); font-size: 13px; letter-spacing: 0.2em; }
.card h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.45; }
.card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); padding-top: 10px; border-top: 1px dashed var(--line); }
.card .row { display: flex; justify-content: space-between; align-items: center; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap; line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.v-ok { color: var(--ok); }
.v-weak { color: var(--weak); }
.v-dead { color: var(--dead); }
.v-na, .v-pending { color: var(--na); }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 6px; }
.tag.free { color: var(--gold); border-color: rgba(200, 164, 94, 0.4); }

/* ---------- library filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 26px; align-items: center; }
.chip { font-size: 13.5px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.chip.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.filters form { margin-left: auto; min-width: 220px; }
.filters input { padding: 7px 14px; border-radius: 999px; font-size: 14px; }
.empty { color: var(--muted); padding: 60px 0; text-align: center; }

/* ---------- strategy page ---------- */
.dossier-head { padding: 64px 0 26px; }
.dossier-head .no { font-family: var(--serif); color: var(--gold); letter-spacing: 0.3em; font-size: 13px; }
.dossier-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 5vw, 44px); margin: 10px 0 14px; letter-spacing: 0.05em; line-height: 1.3; }
.dossier-head .summary { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.cite { margin-top: 22px; padding: 16px 18px; border-left: 2px solid var(--gold); background: rgba(200, 164, 94, 0.05); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--muted); }
.cite i { color: var(--text); font-style: normal; }
.verdict-line { margin-top: 18px; font-size: 14.5px; color: var(--muted); }

.prose { font-size: 16.5px; line-height: 1.95; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin: 46px 0 14px; letter-spacing: 0.06em; }
.prose h2::before { content: "§ "; color: var(--gold); }
.prose h3 { font-size: 17px; margin: 28px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--panel-2); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0 20px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
.prose strong { color: #f3eee2; }

.panel { border: 1px solid var(--line); border-radius: var(--r); background: rgba(20, 22, 28, 0.7); padding: 22px; margin: 18px 0; }
.panel h3 { margin: 0 0 14px; font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0.08em; }
.metrics { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.metrics th, .metrics td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.metrics th:first-child, .metrics td:first-child { text-align: left; color: var(--muted); }
.metrics thead th { color: var(--faint); font-weight: 500; font-size: 12.5px; }
.metrics .b { color: var(--faint); }
.table-scroll { overflow-x: auto; }
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 200px; }

.sealed {
  position: relative; margin: 30px 0; border: 1px solid rgba(200, 164, 94, 0.3); border-radius: var(--r);
  padding: 46px 28px; text-align: center; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(200, 164, 94, 0.025) 0 12px, transparent 12px 24px),
    rgba(20, 22, 28, 0.85);
}
.sealed .seal { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; border: 1px solid var(--gold);
  display: grid; place-items: center; font-family: var(--serif); color: var(--gold); font-size: 22px;
  box-shadow: 0 0 0 6px rgba(200, 164, 94, 0.06), 0 0 40px rgba(200, 164, 94, 0.15); }
.sealed h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 10px; letter-spacing: 0.08em; }
.sealed ul { list-style: none; padding: 0; margin: 18px auto 24px; max-width: 360px; text-align: left; color: var(--muted); font-size: 14.5px; }
.sealed li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sealed li::before { content: "◆"; color: var(--gold); font-size: 9px; margin-right: 10px; vertical-align: 2px; }
.pending-box { color: var(--muted); text-align: center; padding: 30px; border: 1px dashed var(--line-2); border-radius: var(--r); margin: 20px 0; }

.codeview { max-height: 520px; overflow: auto; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.plan { border: 1px solid var(--line); border-radius: var(--r); padding: 28px 24px; background: rgba(20, 22, 28, 0.7); display: flex; flex-direction: column; gap: 6px; }
.plan.hi { border-color: rgba(200, 164, 94, 0.55); background: linear-gradient(180deg, rgba(200, 164, 94, 0.08), rgba(20, 22, 28, 0.7)); }
.plan .name { color: var(--muted); font-size: 14px; letter-spacing: 0.1em; }
.plan .price { font-family: var(--serif); font-size: 34px; }
.plan .price small { font-size: 15px; color: var(--muted); }
.plan p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.howbuy { margin-top: 28px; }
.howbuy ol { color: var(--muted); padding-left: 1.3em; }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 72px auto; width: 100%; }
.auth h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; text-align: center; margin: 0 0 6px; letter-spacing: 0.1em; }
.auth .sub { text-align: center; color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.auth .panel { padding: 26px; }
.auth .alt { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth .alt a { color: var(--gold); }

/* ---------- footer ---------- */
.foot { margin-top: auto; border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--faint); font-size: 13px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; }
.foot .disc { color: var(--muted); }

.fade-in { animation: fade .7s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .grid, .plans { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top .wrap { gap: 14px; }
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-sm, .top .act .hide-sm { display: none; }
  .brand { font-size: 17px; }
  .brand .txt-en { display: none; }
  .grid, .plans { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; padding-bottom: 48px; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger div:nth-child(2) { border-right: 0; }
  .ledger div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filters form { margin-left: 0; width: 100%; }
  .chart-box { height: 240px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.filters.market .chip { font-size: 15px; padding: 7px 20px; }
.badges { display: inline-flex; gap: 6px; align-items: center; }
.tag.beat { color: var(--gold); border-color: rgba(200, 164, 94, 0.4); }
.ledger-note { max-width: 620px; margin: 16px auto 0; color: var(--faint); font-size: 13px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.two-col > div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: rgba(20, 22, 28, 0.6); }
.two-col .k { font-size: 12.5px; color: var(--faint); letter-spacing: 0.08em; margin-bottom: 8px; }
.two-col p { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.found { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 36px 0 0; }
.pager .gap { color: var(--muted); padding: 0 4px; }
.plans.four { grid-template-columns: repeat(4, 1fr); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan p { flex: 1; }
.qr-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 6px 0 14px; }
.qr-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.qr-box img { width: 200px; max-width: 100%; border-radius: 8px; background: #fff; padding: 6px; }
@media (max-width: 980px) { .plans.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans.four { grid-template-columns: 1fr; } }
.btn.disabled { opacity: 0.45; pointer-events: none; }
.qr-live { display: inline-block; background: #fff; padding: 14px; border-radius: 10px; }
.qr-live svg { width: 240px; height: 240px; display: block; }
