/* ==================================================================================
   OASIS 交易资讯 · 独立站点样式
   ─────────────────────────────────────────────────────────────────────────────────
   与终端的彭博栅格、社区的 Telegram 气泡都不同：资讯是**编辑产品**，
   所以版式按「报纸 + 阅读器」来组织：
     · 左栏 = 栏目导航（报纸的版面），中栏 = 头条 + 稿库 + 正文阅读器，
       右栏 = 运营面板（推送 / 推广位 / 热榜）
     · 字号比社区大一档（正文 15px / 行高 1.7）——资讯是要读的，不是要扫的
     · 深色底 #12161C（比社区更中性，少一点蓝，多一点纸感）
     · 强调色只用 OASIS 绿 #00E07A（主行动 / 头条），类别色走数据分层
   全部纯 CSS，零外部请求；支持 prefers-reduced-motion 与打印。
   ================================================================================== */

:root {
  --n-bg: #12161C;
  --n-panel: #171C24;
  --n-panel2: #1D242E;
  --n-hover: #232B36;
  --n-line: #0D1116;
  --n-line2: #262F3B;
  --n-text: #E9EDF1;
  --n-text2: #A6B3C0;
  --n-text3: #6E7D8C;
  --n-green: #00E07A;
  --n-cyan: #35C8F0;
  --n-amber: #FFB020;
  --n-red: #FF3B54;
  --n-violet: #B98CFF;
  --n-accent: #00E07A;
  --n-font: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, Roboto, sans-serif;
  --n-serif: "Georgia", "Songti SC", "SimSun", serif;
  --n-mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.nw { background: var(--n-bg); color: var(--n-text); font-family: var(--n-font);
  font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--n-cyan); }
.hidden { display: none !important; }
.dim { color: var(--n-text3); }
.mono { font-family: var(--n-mono); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2C3742; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 登录门 */
.ngate { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center;
  justify-content: center; background:
  radial-gradient(900px 520px at 50% -10%, #12351F 0%, transparent 60%), var(--n-bg); }
.ngate-box { width: 350px; padding: 26px 24px 20px; background: var(--n-panel);
  border: 1px solid var(--n-line2); border-radius: 12px; display: flex; flex-direction: column; }
.ngate-logo { text-align: center; font-size: 34px; }
.ngate-title { text-align: center; font-size: 19px; font-weight: 700; margin-top: 6px; }
.ngate-sub { text-align: center; font-size: 12px; color: var(--n-text3); margin: 6px 0 16px; line-height: 1.6; }
.ngate-box label { font-size: 12px; color: var(--n-text2); margin: 8px 0 4px; }
.ngate-box input { height: 40px; padding: 0 12px; background: var(--n-panel2);
  border: 1px solid var(--n-line2); border-radius: 8px; outline: none; }
.ngate-box input:focus { border-color: var(--n-accent); }
.ngate-msg { min-height: 18px; font-size: 12px; color: var(--n-red); margin-top: 8px; }
.ngate-foot { font-size: 11px; color: var(--n-text3); margin-top: 10px; line-height: 1.6; }

/* ---------------------------------------------------------------- 骨架 */
.nw-app { display: grid; grid-template-columns: 264px 1fr; height: 100%; }
.nw-app.with-right { grid-template-columns: 264px 1fr 372px; }

/* ---------------------------------------------------------------- 左栏 */
.nw-left { background: var(--n-panel); border-right: 1px solid var(--n-line);
  display: flex; flex-direction: column; min-width: 0; }
.nw-left-head { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; }
.nw-brand { font-size: 15px; letter-spacing: .6px; }
.nw-brand b { color: var(--n-green); }
.nw-icon { width: 32px; height: 32px; border-radius: 8px; color: var(--n-text2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.nw-icon:hover { background: var(--n-hover); color: var(--n-text); }
.nw-left-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--n-line2);
  margin: 4px 12px 10px; border: 1px solid var(--n-line2); border-radius: 8px; overflow: hidden; }
.nw-left-stat > div { background: var(--n-panel2); padding: 6px 9px; }
.nw-left-stat .k { font-size: 10.5px; color: var(--n-text3); }
.nw-left-stat .v { font-family: var(--n-mono); font-size: 16px; font-weight: 700; }
.nw-cats { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.nw-cat { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; border-left: 2px solid transparent; }
.nw-cat:hover { background: var(--n-hover); }
.nw-cat.active { background: var(--n-panel2); border-left-color: var(--n-accent); }
.nw-cat-icon { width: 26px; text-align: center; font-size: 15px; }
.nw-cat-body { flex: 1; min-width: 0; }
.nw-cat-name { font-size: 13.5px; font-weight: 600; }
.nw-cat-en { font-size: 10px; color: var(--n-text3); letter-spacing: .5px; }
.nw-cat-n { font-family: var(--n-mono); font-size: 12px; color: var(--n-text3); }
.nw-cat.active .nw-cat-n { color: var(--n-green); font-weight: 700; }
.nw-left-foot { border-top: 1px solid var(--n-line); padding: 10px 12px 12px; display: flex;
  flex-direction: column; gap: 6px; }
.nw-note { font-size: 11px; color: var(--n-text3); line-height: 1.55; }

/* ---------------------------------------------------------------- 中栏 */
.nw-main { display: flex; flex-direction: column; min-width: 0; position: relative; }
.nw-main-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--n-panel); border-bottom: 1px solid var(--n-line); }
.nw-head-text { flex: 1; min-width: 0; }
.nw-head-title { font-size: 16px; font-weight: 700; }
.nw-head-sub { font-size: 11.5px; color: var(--n-text3); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.nw-head-tools { display: flex; align-items: center; gap: 6px; }
.nw-input { height: 32px; padding: 0 10px; width: 200px; background: var(--n-panel2);
  border: 1px solid var(--n-line2); border-radius: 7px; outline: none; font-size: 13px; }
.nw-input:focus { border-color: var(--n-accent); }
.nw-select { height: 32px; padding: 0 6px; background: var(--n-panel2);
  border: 1px solid var(--n-line2); border-radius: 7px; outline: none; font-size: 13px; }
.nw-scroll { flex: 1; overflow-y: auto; padding: 14px 18px 40px; }
.only-mobile { display: none; }

/* 头条横幅 */
.nw-front { margin-bottom: 16px; }
.nw-hero { border: 1px solid var(--n-line2); border-left: 3px solid var(--n-green);
  background: linear-gradient(180deg, rgba(0, 224, 122, .06), transparent 70%), var(--n-panel);
  border-radius: 10px; padding: 16px 18px; cursor: pointer; }
.nw-hero:hover { border-color: var(--n-green); }
.nw-hero-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #05230C;
  background: var(--n-green); padding: 1px 8px; border-radius: 4px; margin-bottom: 8px; }
.nw-hero-title { font-size: 21px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.nw-hero-deck { font-size: 13.5px; color: var(--n-text2); line-height: 1.65; }
.nw-hero-meta { margin-top: 10px; font-size: 11.5px; color: var(--n-text3); display: flex;
  gap: 12px; flex-wrap: wrap; }
.nw-featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin-top: 10px; }
.nw-fcard { border: 1px solid var(--n-line2); background: var(--n-panel); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; }
.nw-fcard:hover { border-color: var(--n-cyan); }
.nw-fcard .t { font-size: 14px; font-weight: 600; line-height: 1.45; }
.nw-fcard .d { font-size: 11.5px; color: var(--n-text3); margin-top: 5px; }

/* 稿件列表 */
.nw-item { display: flex; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--n-line2);
  cursor: pointer; }
.nw-item:hover { background: rgba(255, 255, 255, .022); }
.nw-item-kind { flex: 0 0 74px; font-size: 11px; color: var(--n-text3); }
.nw-item-kind .ic { display: block; font-size: 17px; margin-bottom: 2px; }
.nw-item-body { flex: 1; min-width: 0; }
.nw-item-title { font-size: 16px; font-weight: 600; line-height: 1.42; }
.nw-item-deck { font-size: 13px; color: var(--n-text2); margin-top: 4px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-item-foot { margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  font-size: 11px; color: var(--n-text3); font-family: var(--n-mono); }
.nw-flags { display: flex; gap: 6px; }
.nw-flag { font-size: 10.5px; padding: 1px 7px; border-radius: 4px; font-family: var(--n-font); }
.nw-flag.top { background: rgba(0, 224, 122, .16); color: var(--n-green); font-weight: 700; }
.nw-flag.featured { background: rgba(53, 200, 240, .14); color: var(--n-cyan); }
.nw-flag.pinned { background: rgba(255, 176, 32, .14); color: var(--n-amber); }
.nw-flag.hot { background: rgba(255, 59, 84, .14); color: var(--n-red); }

/* 正文阅读器 */
.nw-reader { position: absolute; inset: 54px 0 0 0; background: var(--n-bg); overflow-y: auto;
  padding: 18px 22px 60px; z-index: 5; }
.nw-reader-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.nw-reader-wrap { max-width: 760px; }
.nw-reader-title { font-size: 27px; font-weight: 700; line-height: 1.35; letter-spacing: -.2px; }
.nw-reader-deck { font-size: 15px; color: var(--n-text2); margin: 10px 0 14px; line-height: 1.7; }
.nw-reader-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--n-text3);
  border-bottom: 1px solid var(--n-line2); padding-bottom: 12px; margin-bottom: 18px;
  font-family: var(--n-mono); }
.nw-sec { margin: 20px 0; }
.nw-sec h3 { font-size: 14px; color: var(--n-green); letter-spacing: .6px; margin: 0 0 8px;
  text-transform: uppercase; }
.nw-sec li { margin: 5px 0; line-height: 1.75; }
.nw-sec ul { margin: 0; padding-left: 20px; }
.nw-quote { border-left: 3px solid var(--n-line2); padding: 2px 0 2px 12px; color: var(--n-text2);
  font-family: var(--n-serif); }
.nw-disclose { margin-top: 22px; padding: 10px 12px; background: var(--n-panel2);
  border: 1px solid var(--n-line2); border-radius: 8px; font-size: 12px; color: var(--n-text3);
  line-height: 1.65; }
.nw-reader-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------------------------------------------------------------- 右栏 */
.nw-right { background: var(--n-panel); border-left: 1px solid var(--n-line);
  display: flex; flex-direction: column; min-width: 0; }
.nw-right-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  border-bottom: 1px solid var(--n-line); }
.nw-tabs { display: flex; gap: 4px; flex: 1; }
.nw-tab { font-size: 12.5px; padding: 5px 10px; border-radius: 7px; color: var(--n-text3); }
.nw-tab:hover { background: var(--n-hover); color: var(--n-text); }
.nw-tab.active { background: rgba(0, 224, 122, .14); color: var(--n-green); font-weight: 600; }
.nw-pane { flex: 1; overflow-y: auto; padding: 10px 12px 18px; }
.nw-block { border: 1px solid var(--n-line2); border-radius: 8px; background: var(--n-panel2);
  margin-bottom: 10px; overflow: hidden; }
.nw-block-title { font-size: 12px; font-weight: 600; color: var(--n-text2); padding: 7px 11px;
  border-bottom: 1px solid var(--n-line2); }
.nw-block > div:not(.nw-block-title) { padding: 7px 11px; }
.nw-kv { display: flex; gap: 8px; padding: 3px 0; font-size: 13px; }
.nw-kv .k { color: var(--n-text3); flex: 0 0 84px; }
.nw-kv .v { flex: 1; word-break: break-word; }
.nw-meter { position: relative; height: 20px; background: rgba(255, 255, 255, .05);
  border-radius: 6px; margin: 4px 0; overflow: hidden; }
.nw-meter > i { position: absolute; inset: 0 auto 0 0; background: rgba(0, 224, 122, .30); }
.nw-meter > span { position: relative; display: flex; justify-content: space-between;
  padding: 0 9px; font-size: 12px; line-height: 20px; }
.nw-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 11px; }
.nw-slot { padding: 7px 11px; border-bottom: 1px solid var(--n-line2); }
.nw-slot:last-child { border-bottom: 0; }
.nw-slot .lbl { font-size: 11px; color: var(--n-text3); }
.nw-slot .ttl { font-size: 13px; line-height: 1.5; }
.nw-digest-line { font-size: 12.5px; color: var(--n-text2); padding: 3px 0; }
.nw-li { padding: 3px 0 3px 14px; position: relative; font-size: 13px; }
.nw-li::before { content: "·"; position: absolute; left: 3px; color: var(--n-text3); }

/* ---------------------------------------------------------------- 通用 */
.nw-btn { height: 34px; padding: 0 14px; border-radius: 8px; background: var(--n-panel2);
  border: 1px solid var(--n-line2); font-size: 13.5px; }
.nw-btn:hover { background: var(--n-hover); }
.nw-btn.primary { background: var(--n-green); border-color: var(--n-green); color: #04220F;
  font-weight: 700; }
.nw-btn.primary:hover { filter: brightness(1.08); }
.nw-btn.ghost { background: transparent; }
.nw-btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.nw-btn.block { width: 100%; }
.nw-btn:disabled { opacity: .5; cursor: not-allowed; }
.nw-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: flex;
  flex-direction: column; gap: 8px; max-width: 400px; }
.nw-toast { background: var(--n-panel2); border: 1px solid var(--n-line2);
  border-left: 3px solid var(--n-accent); border-radius: 8px; padding: 9px 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45); font-size: 13px; animation: nwin .16s ease-out; }
.nw-toast.err { border-left-color: var(--n-red); }
.nw-toast.ok { border-left-color: var(--n-green); }
.nw-toast.warn { border-left-color: var(--n-amber); }
.nw-toast .t { font-weight: 700; }
.nw-toast .b { color: var(--n-text2); font-size: 12px; margin-top: 2px; }
@keyframes nwin { from { opacity: 0; transform: translateY(6px); } }
.nw-modal { position: fixed; inset: 0; z-index: 96; background: rgba(0, 0, 0, .58);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.nw-modal-box { background: var(--n-panel); border: 1px solid var(--n-line2); border-radius: 12px;
  max-width: 640px; width: 100%; max-height: 84vh; overflow: auto; padding: 16px 18px; }
.nw-skel { height: 74px; margin-bottom: 10px; border-radius: 8px;
  background: linear-gradient(90deg, var(--n-panel2) 25%, var(--n-hover) 37%, var(--n-panel2) 63%);
  background-size: 400% 100%; animation: nwpulse 1.3s ease-in-out infinite; }
@keyframes nwpulse { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.nw-empty { text-align: center; color: var(--n-text3); padding: 46px 20px; line-height: 1.9; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1280px) {
  .nw-app, .nw-app.with-right { grid-template-columns: 232px 1fr; }
  .nw-right { position: fixed; top: 0; right: 0; bottom: 0; width: 372px; z-index: 40;
    box-shadow: -10px 0 26px rgba(0, 0, 0, .5); }
  .nw-input { width: 150px; }
}
@media (max-width: 860px) {
  .nw-app, .nw-app.with-right { grid-template-columns: 1fr; }
  .nw-left { position: fixed; top: 0; left: 0; bottom: 0; width: 268px; z-index: 45;
    transform: translateX(-100%); transition: transform .18s ease-out; }
  body.nw.nav-open .nw-left { transform: none; box-shadow: 10px 0 26px rgba(0, 0, 0, .5); }
  .nw-right { width: 100%; }
  .nw-input { width: 120px; }
  .nw-item-kind { flex: 0 0 46px; }
  .only-mobile { display: inline-flex; }
  .nw-reader-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  .nw-left, .nw-right, .nw-main-head, .nw-reader-actions, .nw-toasts { display: none !important; }
  body.nw, .nw-reader { background: #fff; color: #111; }
}
