/* ============================================================
   NANSEN AI — Mobile H5 · Dark Terminal Tech Style
   Mobile-first · Pure static · No frameworks
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg: #05070d;
  --bg-deep: #020308;
  --surface: #0a0e1a;
  --surface-2: #0d1322;
  --border: rgba(148, 163, 184, 0.14);
  --border-glow: rgba(34, 211, 238, 0.45);
  --text: #e6edf7;
  --text-strong: #ffffff;
  --muted: #8b98ab;
  --muted-2: #5c6b80;
  --primary: #22d3ee;
  --primary-2: #38bdf8;
  --accent: #a78bfa;
  --accent-2: #7c3aed;
  --success: #34d399;
  --danger: #fb7185;
  --warn: #fbbf24;
  --grad: linear-gradient(120deg, #22d3ee 0%, #38bdf8 40%, #a78bfa 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,211,238,.16), rgba(167,139,250,.16));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-glow: 0 0 24px rgba(34, 211, 238, 0.18), 0 0 60px rgba(124, 58, 237, 0.10);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --nav-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
::selection { background: rgba(34, 211, 238, 0.3); }

/* ---------- Background FX ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(34,211,238,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  border-radius: 50%; filter: blur(90px); opacity: .5;
}
.glow-1 { width: 320px; height: 320px; top: -120px; left: -80px; background: #0ea5e9; }
.glow-2 { width: 360px; height: 360px; top: 30%; right: -160px; background: #7c3aed; opacity: .35; }
.glow-3 { width: 300px; height: 300px; bottom: -140px; left: 20%; background: #06b6d4; opacity: .3; }

/* ---------- Layout ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: calc(64px + var(--safe-b)); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-brand img { height: 30px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all .2s;
}
.icon-btn:active { transform: scale(.94); border-color: var(--border-glow); color: var(--primary); }

.lang-btn { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; }

/* Drawer */
.drawer-mask {
  position: fixed; inset: 0; z-index: 199; background: rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: min(320px, 84vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + 8px) 18px 24px;
}
.drawer.open { transform: translateX(0); }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer-lang { display: flex; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  font-family: var(--font-mono); border: 1px solid var(--border); color: var(--muted);
  transition: all .2s;
}
.chip.active { color: #06121a; background: var(--grad); border-color: transparent; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 12px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; color: var(--text);
  transition: background .2s;
}
.drawer-link:active { background: var(--surface-2); }
.drawer-link .k { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.drawer-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.social-row { display: flex; gap: 12px; }

/* ---------- Views ---------- */
.view { display: none; animation: fadeUp .35s ease both; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 42px 20px 26px; text-align: center; overflow: hidden; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: var(--grad-soft);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: var(--primary); margin-bottom: 18px;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 {
  font-size: 42px; line-height: 1.04; font-weight: 800; letter-spacing: -.02em;
  color: var(--text-strong);
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 16px auto 22px; max-width: 340px; color: var(--muted); font-size: 14.5px; }
.hero-cta { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font-size: 15px; font-weight: 700; transition: transform .15s, box-shadow .25s;
  width: 100%;
}
.btn:active { transform: scale(.97); }
.btn-primary { color: #06121a; background: var(--grad); box-shadow: var(--shadow-glow); }
.btn-ghost { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.btn-ghost:active { border-color: var(--border-glow); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13px; width: auto; border-radius: 12px; }
.btn-block { width: 100%; }
.hero-note { margin-top: 12px; font-size: 11.5px; color: var(--muted-2); font-family: var(--font-mono); }

/* Terminal card */
.term {
  margin: 26px 0 4px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-glow); overflow: hidden; text-align: left;
}
.term-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; }
.term-dots i:nth-child(1) { background: #f87171; }
.term-dots i:nth-child(2) { background: #fbbf24; }
.term-dots i:nth-child(3) { background: #34d399; }
.term-title { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.term-body { padding: 14px 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term .prompt { color: var(--primary); }
.term .cmd { color: var(--text); }
.term .ok { color: var(--success); }
.term .dim { color: var(--muted-2); }
.cursor { display: inline-block; width: 8px; height: 14px; background: var(--primary); vertical-align: middle; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 8px 16px 6px; }
.stat {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 16px 14px; text-align: center;
}
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--text-strong); font-family: var(--font-mono); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 3px; }

/* ---------- Sections ---------- */
.section { padding: 34px 18px; }
.section-tight { padding-top: 18px; }
.sec-head { text-align: center; margin-bottom: 24px; }
.sec-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--primary);
  border: 1px solid var(--border-glow); background: var(--grad-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}
.sec-title { font-size: 26px; font-weight: 800; line-height: 1.18; color: var(--text-strong); letter-spacing: -.01em; }
.sec-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-desc { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 360px; margin-inline: auto; }

/* ---------- Cards ---------- */
.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 20px 18px;
  transition: border-color .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 200px at 20% 0%, rgba(34,211,238,.07), transparent);
}
.card:hover, .card:active { border-color: var(--border-glow); box-shadow: 0 0 0 1px var(--border-glow), var(--shadow-glow); }
.card-num { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); letter-spacing: .1em; margin-bottom: 8px; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--text-strong); margin-bottom: 6px; }
.card p { font-size: 13.5px; color: var(--muted); }
.card ul { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.card li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); }
.card li::before { content: "▸"; color: var(--primary); font-family: var(--font-mono); }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.card-link::after { content: "→"; transition: transform .2s; }
.card-link:active::after { transform: translateX(3px); }

/* ---------- Video showcase ---------- */
.video-card { border: 1px solid var(--border-glow); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-glow); }
.video-shell { position: relative; aspect-ratio: 16/9; background: #000; }
.video-shell video { width: 100%; height: 100%; object-fit: cover; }
.video-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.video-meta .t { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .05em; }
.video-meta .live { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 10.5px; font-family: var(--font-mono); }
.video-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(5,7,13,.55); backdrop-filter: blur(2px);
  transition: opacity .25s; z-index: 2;
}
.video-overlay.hidden { opacity: 0; pointer-events: none; }
.play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #06121a; box-shadow: 0 0 30px rgba(34,211,238,.5);
  font-size: 20px; transition: transform .2s;
}
.play-btn:active { transform: scale(.9); }
.video-loading {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: var(--bg); color: var(--muted); font-family: var(--font-mono); font-size: 12px;
  transition: opacity .3s;
}
.video-loading.hidden { opacity: 0; pointer-events: none; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.video-err {
  position: absolute; inset: 0; z-index: 4; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px;
  background: var(--surface); color: var(--muted); font-size: 13px;
}
.video-err.show { display: flex; }

/* ---------- Flow (Discover/Trade/Track) ---------- */
.flow-steps { display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.flow {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 18px 16px; display: flex; gap: 14px; align-items: flex-start;
  counter-increment: step; transition: border-color .25s;
}
.flow:active { border-color: var(--border-glow); }
.flow-idx {
  flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 800; font-size: 14px; color: var(--primary);
  background: var(--grad-soft); border: 1px solid var(--border-glow);
}
.flow-body h3 { font-size: 16.5px; font-weight: 700; color: var(--text-strong); }
.flow-body p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.flow ul { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.flow li { font-size: 12.5px; color: var(--text); display: flex; gap: 7px; }
.flow li::before { content: "✓"; color: var(--success); font-family: var(--font-mono); }

/* ---------- Ticker ---------- */
.ticker-wrap { overflow: hidden; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.ticker { display: flex; gap: 26px; white-space: nowrap; animation: ticker 32s linear infinite; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.ticker span b { color: var(--success); font-weight: 700; }
.ticker span.neg b { color: var(--danger); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Leaderboard ---------- */
.lead { display: flex; flex-direction: column; gap: 8px; }
.lead-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 12px 14px;
}
.lead-item .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lead-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--grad-soft); color: var(--primary); border: 1px solid var(--border-glow);
}
.lead-item .n { font-size: 13.5px; font-weight: 700; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-item .r { font-size: 11px; color: var(--muted-2); }
.lead-item .v { text-align: right; }
.lead-item .v b { display: block; font-size: 14.5px; font-weight: 800; font-family: var(--font-mono); }
.lead-item .v b.up { color: var(--success); }
.lead-item .v b.down { color: var(--danger); }
.lead-item .v span { font-size: 10.5px; color: var(--muted-2); }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag {
  padding: 9px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: all .2s;
}
.tag:active { border-color: var(--border-glow); color: var(--primary); background: var(--grad-soft); }

/* ---------- AI chat demo ---------- */
.chat {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.chat-avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #06121a; font-weight: 800; font-size: 14px; }
.chat-head .t { font-size: 13.5px; font-weight: 700; color: var(--text-strong); }
.chat-head .s { font-size: 10.5px; color: var(--muted-2); font-family: var(--font-mono); }
.chat-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.bubble { max-width: 88%; padding: 10px 13px; border-radius: 14px; line-height: 1.55; }
.bubble.user { align-self: flex-end; background: var(--grad-soft); border: 1px solid var(--border-glow); color: var(--text); }
.bubble.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.bubble.ai .mono { font-family: var(--font-mono); color: var(--primary); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input {
  flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); padding: 0 14px; font-size: 13px; outline: none;
}
.chat-input input:focus { border-color: var(--border-glow); }
.chat-input button { height: 42px; padding: 0 16px; border-radius: 12px; }

/* ---------- Pricing ---------- */
.plans { display: flex; flex-direction: column; gap: 12px; }
.plan { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px 18px; position: relative; }
.plan.hot { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.plan-badge { position: absolute; top: -10px; right: 16px; background: var(--grad); color: #06121a; font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono); letter-spacing: .04em; }
.plan h3 { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.plan .price { font-size: 30px; font-weight: 800; font-family: var(--font-mono); color: var(--text-strong); margin: 8px 0 2px; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan .desc { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.plan li { display: flex; gap: 8px; font-size: 13px; color: var(--text); }
.plan li::before { content: "✓"; color: var(--success); font-family: var(--font-mono); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 16px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text-strong);
}
.faq-q .ic { font-family: var(--font-mono); color: var(--primary); transition: transform .25s; font-size: 16px; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 16px 15px; font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ---------- Contact form ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: 13px 14px; font-size: 14px; outline: none; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--border-glow); }
.form-success { display: none; text-align: center; padding: 30px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.form-success.show { display: block; }
.form-success .ic { font-size: 40px; }
.form-success h3 { color: var(--success); margin: 8px 0 4px; }
.form-success p { color: var(--muted); font-size: 13px; }

/* ---------- Subscribe card ---------- */
.sub-card {
  border: 1px solid var(--border-glow); border-radius: var(--radius);
  background: var(--grad-soft); padding: 26px 20px; text-align: center;
}
.sub-card h3 { font-size: 21px; font-weight: 800; color: var(--text-strong); }
.sub-card p { color: var(--muted); font-size: 13px; margin: 8px 0 18px; }
.sub-form { display: flex; gap: 8px; }
.sub-form input {
  flex: 1; height: 46px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: 0 14px; font-size: 13.5px; outline: none;
}
.sub-form input:focus { border-color: var(--border-glow); }
.sub-ok { display: none; font-size: 13.5px; color: var(--success); font-weight: 600; margin-top: 10px; font-family: var(--font-mono); }
.sub-ok.show { display: block; }

/* ---------- CTA banner ---------- */
.cta-banner {
  border: 1px solid var(--border-glow); border-radius: var(--radius);
  padding: 34px 22px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, rgba(34,211,238,.14), rgba(124,58,237,.10) 55%, transparent);
}
.cta-banner h2 { font-size: 28px; font-weight: 800; color: var(--text-strong); line-height: 1.15; }
.cta-banner h2 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-banner p { color: var(--muted); font-size: 14px; margin: 12px auto 20px; max-width: 300px; }

/* ---------- Resources ---------- */
.post {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 8px;
}
.post .cat { font-family: var(--font-mono); font-size: 10.5px; color: var(--primary); letter-spacing: .08em; text-transform: uppercase; }
.post h3 { font-size: 16px; font-weight: 700; color: var(--text-strong); }
.post p { font-size: 13px; color: var(--muted); }
.post .meta { font-size: 11px; color: var(--muted-2); font-family: var(--font-mono); }

/* ---------- About / Legal ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 1px solid var(--border); margin-left: 8px; padding-left: 20px; }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before { content: ""; position: absolute; left: -25px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.tl-item .y { font-family: var(--font-mono); font-size: 11.5px; color: var(--primary); }
.tl-item h4 { font-size: 15px; color: var(--text-strong); margin: 3px 0; }
.tl-item p { font-size: 12.5px; color: var(--muted); }
.legal-body h2 { font-size: 20px; font-weight: 800; color: var(--text-strong); margin: 22px 0 8px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.legal-body ul { padding-left: 18px; }

/* ---------- 404 ---------- */
.err404 { text-align: center; padding: 70px 20px; }
.err404 .code { font-size: 90px; font-weight: 800; font-family: var(--font-mono); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.err404 h2 { font-size: 22px; color: var(--text-strong); margin: 12px 0 8px; }
.err404 p { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 26px 18px 30px;
  background: var(--bg-deep);
}
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-brand img { height: 24px; width: auto; }
.footer p.dim { color: var(--muted-2); font-size: 12px; margin-bottom: 16px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 18px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; font-family: var(--font-mono); }
.footer-col a { display: block; font-size: 13.5px; color: var(--text); padding: 4px 0; }
.footer-col a:active { color: var(--primary); }
.footer-legal { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted-2); }
.footer-legal a { color: var(--muted-2); }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 90;
  height: calc(58px + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; border-top: 1px solid var(--border);
  background: rgba(5, 7, 13, 0.9); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10px; color: var(--muted-2); font-weight: 600; transition: color .2s;
}
.tabbar button .ic { font-size: 19px; line-height: 1; }
.tabbar button.active { color: var(--primary); }

/* ---------- Page head ---------- */
.page-head { padding: 30px 20px 20px; text-align: center; }
.page-head .sec-title { font-size: 30px; }

/* ---------- Utility ---------- */
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }

/* ---------- Safe area ---------- */
@supports (padding: max(0px)) {
  .app { padding-bottom: max(64px, env(safe-area-inset-bottom)); }
}
