/* ============================================================
   GINTOL · 资讯 / 会员页样式
   依赖 styles.css 的基础变量与 header / footer / button
   本文件只在 news.html / login.html / account.html 中加载，
   首页不必为它付出加载成本。
   ============================================================ */

/* ---------------- 资讯页头 ---------------- */
.news-main { min-height: 60vh; }
.news-hero {
  position: relative;
  padding: 44px 0 30px;
  background:
    radial-gradient(760px 320px at 12% -20%, rgba(255, 106, 19, .13), transparent 70%),
    linear-gradient(180deg, #fff8f2, var(--bg) 92%);
  border-bottom: 1px solid var(--line);
}
.news-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 4.4vw, 38px);
  letter-spacing: -.02em;
  line-height: 1.25;
}
.news-hero p { max-width: 620px; color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }
.news-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; }
.news-stats div { display: flex; align-items: baseline; gap: 7px; }
.news-stats strong { font-size: 20px; font-weight: 820; color: var(--o-deep); }
.news-stats span { font-size: 12px; color: var(--muted); }

.news-body { padding: 26px 0 76px; }

/* ---------------- 工具栏 ---------------- */
.news-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.news-tabs { display: flex; gap: 6px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.news-tab {
  height: 38px; padding: 0 16px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; transition: .18s;
}
.news-tab:hover { background: var(--o-pale); color: var(--o-deep); }
.news-tab.is-active { background: var(--o); color: #fff; box-shadow: 0 6px 16px rgba(255, 106, 19, .26); }
.news-tab i { font-style: normal; font-size: 11.5px; opacity: .72; }
.news-search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: 44px;
  padding: 0 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; color: var(--muted); transition: .18s;
}
.news-search:focus-within { border-color: #ffc79b; box-shadow: 0 0 0 4px rgba(255, 106, 19, .08); }
.news-search .ico { width: 18px; height: 18px; flex: none; }
.news-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 14px; color: var(--ink);
}
.news-sort {
  height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font-size: 13.5px; color: var(--ink-2);
}

/* ---------------- 列表卡片 ---------------- */
.news-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.news-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #ffd7bb; }
.news-card.is-pinned { border-color: #ffd0ad; }

.nc-cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(140deg, var(--a, #ffb27a), var(--b, #f0520a));
}
.nc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nc-cover-txt {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34px; font-weight: 900; letter-spacing: .18em;
  color: rgba(255, 255, 255, .28); text-transform: uppercase;
  user-select: none;
}
.nc-type {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  padding: 4px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 700;
  background: rgba(255, 255, 255, .92); color: var(--o-deep);
  backdrop-filter: blur(4px);
}
.nc-type.is-news { color: #2f6bff; }
.nc-pin {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  padding: 4px 9px; border-radius: 7px; font-size: 11px; font-weight: 700;
  background: rgba(27, 25, 23, .72); color: #fff;
}
.nc-body { padding: 16px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.nc-body h3 {
  font-size: 16px; line-height: 1.62; font-weight: 760; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-body p {
  margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-foot {
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted);
}
.nc-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: #d9d2ca; }
.nc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.nc-tags span {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: var(--o-pale); color: var(--o-deep);
}

.news-empty {
  padding: 60px 20px; text-align: center; color: var(--muted);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.news-empty b { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.news-more { display: block; margin: 26px auto 0; }

/* ---------------- 文章详情 ---------------- */
.article { max-width: 780px; margin: 0 auto; }
.article-back {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border-radius: 10px; background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); margin-bottom: 20px;
}
.article-back:hover { border-color: #ffc79b; color: var(--o-deep); }
.article-back .ico { width: 16px; height: 16px; transform: scaleX(-1); }
.article-head h1 {
  font-size: clamp(24px, 4vw, 34px); line-height: 1.35; letter-spacing: -.02em;
  margin-bottom: 12px;
}
.article-meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); margin-bottom: 18px;
}
.article-meta .pill-type {
  padding: 4px 10px; border-radius: 7px; font-weight: 700; font-size: 11.5px;
  background: var(--o-soft); color: var(--o-deep);
}
.article-meta .pill-type.is-news { background: #eef3ff; color: #2f6bff; }
.article-cover {
  margin: 0 0 26px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(140deg, var(--a, #ffb27a), var(--b, #f0520a));
}
.article-cover img { width: 100%; display: block; }
.article-cover.no-img { aspect-ratio: 21 / 9; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 0; }
.article-tags a {
  font-size: 12px; padding: 5px 11px; border-radius: 8px;
  background: var(--o-pale); color: var(--o-deep); border: 1px solid #ffe0cb;
}
.article-share {
  margin-top: 28px; padding: 16px 18px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.article-share .btn { height: 38px; }
.article-nav {
  margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.article-nav a {
  padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.article-nav a:hover { border-color: #ffc79b; }
.article-nav small { font-size: 11.5px; color: var(--muted); }
.article-nav b {
  font-size: 13.5px; font-weight: 650; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-nav .next { text-align: right; align-items: flex-end; }

/* ---------------- Markdown 正文 ---------------- */
.md {
  font-size: 16px; line-height: 1.95; color: #2b2723;
  word-break: break-word;
}
.md > *:first-child { margin-top: 0; }
.md h2 {
  font-size: 21px; line-height: 1.45; margin: 38px 0 14px; letter-spacing: -.01em;
  padding-left: 13px; border-left: 4px solid var(--o); border-radius: 2px;
}
.md h3 { font-size: 17.5px; margin: 28px 0 10px; }
.md h4 { font-size: 16px; margin: 22px 0 8px; }
.md p { margin: 0 0 17px; }
.md a { color: var(--o-deep); text-decoration: underline; text-underline-offset: 3px; }
.md strong { font-weight: 750; color: #17140f; }
.md ul, .md ol { margin: 0 0 18px; padding-left: 22px; list-style: revert; }
.md ul { list-style: disc; }
.md li { margin: 7px 0; padding-left: 2px; }
.md li::marker { color: var(--o); }
.md blockquote {
  margin: 22px 0; padding: 14px 18px; border-left: 4px solid #ffc79b;
  background: var(--o-pale); border-radius: 0 12px 12px 0; color: #5a4a3d;
}
.md blockquote > :last-child { margin-bottom: 0; }
.md hr { margin: 32px 0; border: 0; border-top: 1px dashed #e2dbd3; }
.md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; padding: 2px 6px; border-radius: 6px;
  background: #f5f1ec; color: #b3440a;
}
.md .md-pre {
  margin: 0 0 20px; padding: 16px 18px; border-radius: 12px;
  background: #241f1b; color: #f4ece6; overflow-x: auto; font-size: 13.5px;
  line-height: 1.75;
}
.md .md-pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.md .md-img { max-width: 100%; border-radius: 12px; display: block; margin: 20px 0; }
.md .md-table-wrap { overflow-x: auto; margin: 0 0 20px; }
.md table { width: 100%; border-collapse: collapse; font-size: 14px; }
.md th, .md td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.md th { background: #faf7f4; font-weight: 700; }

/* ---------------- 登录 / 注册 ---------------- */
.auth-page {
  min-height: calc(100dvh - 74px);
  display: grid; place-items: center;
  padding: 40px 20px calc(48px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(680px 340px at 50% -10%, rgba(255, 106, 19, .14), transparent 72%),
    var(--bg);
}
.auth-shell { width: min(440px, 100%); }
.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow-md);
}
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head .brand-mark { width: 46px; height: 46px; margin: 0 auto 12px; }
.auth-head h1 { font-size: 21px; letter-spacing: -.01em; }
.auth-head p { margin-top: 7px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; background: #f7f3ef; border-radius: 12px; margin-bottom: 20px;
}
.auth-tabs button {
  height: 38px; border-radius: 9px; font-size: 13.5px; font-weight: 650; color: var(--ink-2);
}
.auth-tabs button.is-active { background: #fff; color: var(--o-deep); box-shadow: var(--shadow-sm); }
.auth-field { display: block; margin-bottom: 14px; }
.auth-field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.auth-field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--line); background: #fdfdfc; font-size: 16px; color: var(--ink);
  transition: .18s;
}
.auth-field input:focus {
  outline: 0; border-color: #ffbe8a; background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 106, 19, .1);
}
.auth-msg { min-height: 18px; font-size: 12.5px; color: #d33; margin: 2px 0 12px; }
.auth-msg.ok { color: #12885a; }
.auth-submit { width: 100%; height: 48px; font-size: 15px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-switch button { color: var(--o-deep); font-weight: 650; }
.auth-note {
  margin-top: 16px; padding: 12px 14px; border-radius: 11px;
  background: var(--o-pale); font-size: 12px; color: #7a5b46; line-height: 1.7;
}
.auth-back { display: block; margin: 18px auto 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-back:hover { color: var(--o-deep); }

/* ---------------- 个人中心 ---------------- */
.account-wrap { padding: 32px 0 76px; }
.account-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.account-avatar {
  width: 60px; height: 60px; border-radius: 18px; flex: none;
  display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, #ff9a4d, #f0520a);
}
.account-hero h1 { font-size: 20px; letter-spacing: -.01em; }
.account-hero p { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.account-hero .btn { margin-left: auto; }
.account-section { margin-top: 22px; }
.account-section h2 { font-size: 16px; margin-bottom: 12px; }
.fav-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fav-item {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.fav-item:hover { border-color: #ffd0ad; }
.fav-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--a, #ff9a4d), var(--b, #f0520a));
}
.fav-item b { display: block; font-size: 14px; }
.fav-item small { color: var(--muted); font-size: 11.5px; }
.fav-item .fav-del {
  margin-left: auto; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; color: var(--muted); flex: none;
}
.fav-item .fav-del:hover { background: #fff1e5; color: var(--o-deep); }
.account-empty {
  padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px;
  background: #fff; border: 1px dashed var(--line); border-radius: 14px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .news-hero { padding: 30px 0 24px; }
  .news-hero p { font-size: 13.5px; }
  .article { max-width: none; }
}
@media (max-width: 640px) {
  .news-toolbar { gap: 10px; }
  .news-tabs { width: 100%; }
  .news-tab { flex: 1; justify-content: center; }
  .news-search { order: 3; flex: 1 1 100%; }
  .news-sort { flex: 1; }
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .news-card { flex-direction: row; }
  .nc-cover { width: 40%; aspect-ratio: auto; min-height: 108px; flex: none; }
  .nc-cover-txt { font-size: 20px; }
  .nc-type { left: 8px; top: 8px; padding: 3px 8px; font-size: 10.5px; }
  .nc-pin { right: 8px; top: 8px; }
  .nc-body { padding: 12px 13px; }
  .nc-body h3 { font-size: 14.5px; -webkit-line-clamp: 2; }
  .nc-body p { font-size: 12px; -webkit-line-clamp: 2; margin-top: 6px; }
  .nc-tags { display: none; }
  .nc-foot { padding-top: 9px; font-size: 11px; gap: 7px; }
  .md { font-size: 15.5px; line-height: 1.92; }
  .md h2 { font-size: 19px; margin: 30px 0 12px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-share { padding: 14px; }
  .article-jump { flex-direction: column; align-items: flex-start; }
  .fav-grid { grid-template-columns: minmax(0, 1fr); }
  .account-hero { padding: 18px; }
  .account-hero .btn { margin-left: 0; width: 100%; }
  .auth-card { padding: 22px 18px; border-radius: 18px; }
  .auth-page { padding: 26px 16px calc(32px + env(safe-area-inset-bottom, 0px)); align-items: start; }
}
@media (max-width: 380px) {
  .nc-cover { width: 36%; min-height: 96px; }
  .nc-body h3 { font-size: 14px; }
}

/* ---------------- 文章增强：媒体标记 / 导语 / 相关阅读 ---------------- */
.nc-mark {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px;
  border-radius: 6px; background: #fff1e6; color: var(--o-deep);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
}
.nc-mark.alt { background: #eaf6f0; color: #137a52; }
.nc-mark.ext { background: #eaf0ff; color: #2c4bcb; }
/* 文章独立跳转链接（详情页 CTA） */
.article-jump {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 20px 0 4px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(120deg, #fff7f0, #fff); border: 1px solid #ffdcc0;
}
.article-jump .btn { height: 40px; font-size: 13.5px; }
.article-jump .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.article-jump span { font-size: 12px; color: var(--muted); word-break: break-all; }
.article-lead {
  margin: 14px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.85;
  max-width: 680px;
}
.article-draft-tip {
  margin: 0 0 18px; padding: 10px 14px; border-radius: 10px;
  background: #fff5e6; border: 1px solid #ffdcae; color: #9a5a0c; font-size: 12.5px;
}
.article-related { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.article-related h3 { font-size: 16px; margin: 0 0 14px; }
.ar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ar-grid a {
  display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 15px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.ar-grid a:hover { transform: translateY(-3px); border-color: #ffd7bb; box-shadow: var(--shadow-md); }
.ar-type { font-size: 10.5px; font-weight: 700; color: var(--o-deep); }
.ar-grid b {
  font-size: 13.5px; line-height: 1.6; font-weight: 680;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ar-grid small { font-size: 11px; color: var(--muted); }

/* ---------------- 文章内视频 ---------------- */
.md-video {
  margin: 24px 0; border-radius: 14px; overflow: hidden;
  background: #1d1a17; border: 1px solid #322c26;
}
.md-video-frame {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #14110f;
}
.md-video-cap {
  margin: 0; padding: 11px 16px; color: #e8ded5; font-size: 12.5px;
  background: #26211d; border-top: 1px solid #3a332d;
}
.md-video-link {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  color: #fff; text-decoration: none; min-height: 108px;
}
.md-video-link:hover .md-vplay { background: var(--o); transform: scale(1.06); }
.md-vplay {
  flex: none; width: 46px; height: 46px; border-radius: 50%; background: #3d342d;
  display: grid; place-items: center; font-size: 16px; padding-left: 3px;
  transition: background .2s, transform .2s;
}
.md-vtext { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.md-vtext b { font-size: 14.5px; font-weight: 700; }
.md-vtext small { font-size: 11.5px; color: #a99e95; }
.md-video-link em { font-style: normal; font-size: 12px; color: #ffc79b; white-space: nowrap; }

/* ---------------- 文章内软件下载 ---------------- */
.md-downloads {
  margin: 24px 0; padding: 18px; border-radius: 14px;
  background: linear-gradient(180deg, #fffaf6, #fff);
  border: 1px solid #ffdfc4;
}
.md-dl-title {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 750;
  color: var(--o-deep); margin-bottom: 12px;
}
.md-dl-title span {
  width: 22px; height: 22px; border-radius: 7px; background: var(--o); color: #fff;
  display: grid; place-items: center; font-size: 13px;
}
.md-dl-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; margin-top: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit; transition: border-color .18s, transform .18s;
}
.md-dl-item:hover { border-color: #ffc79b; transform: translateX(3px); }
.md-dl-ico {
  flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--o-pale); color: var(--o-deep); font-weight: 800;
}
.md-dl-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.md-dl-text b { font-size: 14px; font-weight: 700; }
.md-dl-text small { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.md-dl-item em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--o-deep); white-space: nowrap; }

@media (max-width: 760px) {
  .ar-grid { grid-template-columns: 1fr; }
  .article-lead { font-size: 14px; }
  .md-video-link { padding: 15px; gap: 10px; }
  .md-video-link em { display: none; }
  .md-downloads { padding: 14px; }
  .md-dl-text b { font-size: 13px; }
}
