/*
Theme Name: 万洲金业 · 贵金属知识学院
Theme URI: https://www.wanyejinye.example/
Author: 万洲金业贵金属知识编辑部
Author URI: https://www.wanyejinye.example/
Description: 面向贵金属知识科普与投资者教育的 SEO 友好 WordPress 主题。内置 TKD、OG/Twitter、canonical、robots、AI 友好标签（llms.txt / ai-*）、JSON-LD 结构化数据与面包屑；首页手动 TKD，其余页面动态调用；首页含万洲介绍、万洲问答与最新 6 篇文章模块。
Version: 1.0.0
Requires at least: 5.5
Requires PHP: 7.4
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wanye
Tags: blog, education, news, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, translation-ready, seo
*/
/* ==========================================================================
   贵金属学院 Precious Metals Academy
   仿 Runoob 文档站框架:顶部导航 + 分类首页 + 教程页(左目录/中正文/右相关)
   视觉风格:深蓝主色 + 金色点缀 + 白卡片
   ========================================================================== */

:root {
  --navy-950: #070f1a;
  --navy-900: #0a1420;
  --navy-850: #0d1a29;
  --navy-800: #102133;
  --navy-700: #16283d;
  --navy-600: #1e3450;
  --navy-500: #2a4465;

  --gold-700: #9c7417;
  --gold-600: #b98a1e;
  --gold-500: #c9a227;
  --gold-400: #FFDA91;
  --gold-300: #e6cd80;
  --gold-100: #f6ecd0;
  --gold-50:  #fbf6e7;

  --bg: #f3f5f8;
  --bg-soft: #eef1f5;
  --card: #ffffff;

  --text: #2a3441;
  --text-strong: #161e28;
  --muted: #64748b;
  --muted-2: #8a97a6;

  --border: #e4e8ee;
  --border-strong: #d4dae3;

  --up: #d92b2b;      /* 涨-红 */
  --down: #0f9d58;    /* 跌-绿 */

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(16, 30, 54, .06);
  --shadow: 0 2px 12px rgba(16, 30, 54, .08);
  --shadow-lg: 0 8px 28px rgba(16, 30, 54, .14);

  --header-h: 56px;
  --sidebar-w: 250px;
  --aside-w: 280px;
  --content-max: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--navy-600); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-600); }

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   顶部导航栏
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 10px rgba(0,0,0,.3);
}
.site-header__bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}
.logo__mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #241b03;
  font-size: 17px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(201,162,39,.4);
}
.logo small { color: var(--gold-300); font-weight: 400; font-size: 12px; }

.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.main-nav a {
  display: block;
  padding: 8px 14px;
  color: #c6d2de;
  font-size: 14.5px;
  border-radius: 6px;
  white-space: nowrap;
}
.main-nav a:hover { color: #fff; background: var(--navy-700); }
.main-nav a.active { color: var(--gold-300); background: var(--navy-800); font-weight: 600; }

.header-search { display: flex; flex: none; }
.header-search input {
  width: 200px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--navy-600);
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: var(--navy-850);
  color: #fff;
  font-size: 13.5px;
  outline: none;
}
.header-search input::placeholder { color: #6d8299; }
.header-search input:focus { border-color: var(--gold-600); }
.header-search button {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 0 6px 6px 0;
  background: var(--gold-500);
  color: #241b03;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.header-search button:hover { background: var(--gold-400); }

.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--navy-600);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* ==========================================================================
   Hero / Banner
   ========================================================================== */
.hero {
  background:
    radial-gradient(1000px 300px at 15% -50%, rgba(201,162,39,.16), transparent 60%),
    radial-gradient(800px 300px at 85% 120%, rgba(42,68,101,.5), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #fff;
  padding: 48px 0 52px;
}
.hero h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.3;
}
.hero h1 span { color: var(--gold-400); }
.hero p {
  margin-top: 12px;
  color: #a9b9cb;
  font-size: 16px;
  max-width: 640px;
}
.hero-search {
  margin-top: 24px;
  display: flex;
  max-width: 560px;
}
.hero-search input {
  flex: 1;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--navy-500);
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: #fff;
  font-size: 15px;
  outline: none;
  color: var(--text-strong);
}
.hero-search button {
  height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 0 8px 8px 0;
  background: var(--gold-500);
  color: #241b03;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.hero-search button:hover { background: var(--gold-400); }
.hero-tags { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tags a {
  padding: 5px 14px;
  border: 1px solid rgba(201,162,39,.4);
  border-radius: 20px;
  color: var(--gold-300);
  font-size: 13px;
}
.hero-tags a:hover { background: rgba(201,162,39,.12); color: #fff; }

/* ==========================================================================
   首页分类区块(仿 runoob 首页)
   ========================================================================== */
.section { padding: 34px 0 10px; }
.section__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-500);
  position: relative;
}
.section__head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 90px; height: 2px;
  background: var(--navy-800);
}
.section__head h2 { font-size: 22px; color: var(--text-strong); font-weight: 700; }
.section__head .en { font-size: 13px; color: var(--muted-2); letter-spacing: 1px; text-transform: uppercase; }
.section__head .more { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.section__head .more:hover { color: var(--gold-600); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 18px 0;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-400);
}
.card__icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--gold-50);
  color: var(--gold-600);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.card h3 { font-size: 16px; color: var(--text-strong); margin-bottom: 6px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.card .tag { display:inline-block; margin-top: 10px; font-size: 12px; color: var(--gold-600); }

/* ==========================================================================
   面包屑
   ========================================================================== */
.breadcrumb {
  padding: 14px 0;
  font-size: 13.5px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold-600); }
.breadcrumb .sep { margin: 0 8px; color: #c2cad4; }
.breadcrumb .current { color: var(--text-strong); font-weight: 600; }

/* ==========================================================================
   教程详情页:三栏布局
   ========================================================================== */
.layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 40px;
}

/* --- 左侧目录树 --- */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  background: var(--navy-850);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.sidebar__title {
  padding: 16px 18px 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar__title .ico { color: var(--gold-400); }
.toc { padding: 8px 0; }
.toc > li > a {
  display: block;
  padding: 9px 18px;
  color: #b8c6d6;
  font-size: 13.5px;
  border-left: 3px solid transparent;
}
.toc > li > a:hover { color: #fff; background: rgba(255,255,255,.05); }
.toc > li > a.active {
  color: var(--gold-300);
  background: rgba(201,162,39,.12);
  border-left-color: var(--gold-400);
  font-weight: 600;
}

/* --- 中间正文 --- */
.content { flex: 1; min-width: 0; }
.article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 40px;
  box-shadow: var(--shadow-sm);
}
.article__title {
  font-size: 28px;
  color: var(--text-strong);
  line-height: 1.4;
  margin-bottom: 6px;
}
.article__meta {
  font-size: 13px;
  color: var(--muted-2);
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.article__body { font-size: 15.5px; color: var(--text); }
.article__body h2 {
  font-size: 21px;
  color: var(--text-strong);
  margin: 30px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--gold-500);
  line-height: 1.4;
}
.article__body h3 { font-size: 17.5px; color: var(--text-strong); margin: 24px 0 10px; }
.article__body p { margin: 12px 0; }
.article__body ul, .article__body ol { margin: 12px 0 12px 6px; }
.article__body ul li {
  position: relative;
  padding-left: 20px;
  margin: 6px 0;
}
.article__body ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-500);
}
.article__body ol { counter-reset: item; }
.article__body ol li { position: relative; padding-left: 26px; margin: 6px 0; counter-increment: item; }
.article__body ol li::before {
  content: counter(item);
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  border-radius: 4px;
  background: var(--navy-800);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article__body strong { color: var(--text-strong); }
.article__body a { color: var(--gold-600); text-decoration: underline; }
.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.article__body table th, .article__body table td {
  border: 1px solid var(--border-strong);
  padding: 9px 12px;
  text-align: left;
}
.article__body table th { background: var(--navy-800); color: #fff; font-weight: 600; }
.article__body table tr:nth-child(even) td { background: var(--bg-soft); }

.article__tip {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  border-left: 4px solid;
}
.article__tip.note { background: #eef6ff; border-color: #3b82f6; color: #1e4f8a; }
.article__tip.warn { background: #fff7ed; border-color: #f59e0b; color: #8a5a0a; }
.article__tip.danger { background: #fef2f2; border-color: #ef4444; color: #8c1f1f; }
.article__tip.gold { background: var(--gold-50); border-color: var(--gold-500); color: #7a5c10; }

/* 上一篇 / 下一篇 */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pager a,
.pager .page-numbers,
.pager .dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 40px;
  height: 40px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: all .15s;
}
.pager .dots {
  border-color: transparent;
  background: transparent;
  color: var(--muted-2);
  cursor: default;
}
.pager a:hover {
  border-color: var(--gold-500);
  background: var(--gold-50);
  color: var(--gold-700);
  transform: translateY(-1px);
}
.pager .page-numbers.current {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-color: var(--navy-900);
  color: var(--gold-400);
  box-shadow: 0 4px 10px rgba(10, 20, 32, .18);
  cursor: default;
}

/* --- 右侧相关 --- */
.aside { width: var(--aside-w); flex: none; }
.aside__box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.aside__box h4 {
  font-size: 15px;
  color: var(--text-strong);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.aside__box h4 .ico { color: var(--gold-500); }
.aside__list li { margin-bottom: 10px; }
.aside__list li a { font-size: 13.5px; color: var(--text); line-height: 1.5; display: block; }
.aside__list li a:hover { color: var(--gold-600); }
.aside__list li .num {
  display: inline-block;
  width: 20px; height: 20px;
  margin-right: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  line-height: 20px;
}
.aside__list li:first-child .num { background: var(--gold-500); color: #241b03; }
.aside__list li a { position: relative; padding-right: 2px; }
.aside__list--num li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.aside__list--num li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.aside__list--num li a {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  display: block;
}
.aside__list--num li a .num {
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 7px;
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 4px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  vertical-align: 1px;
}
.aside__list--num li:nth-child(-n+3) a .num { background: var(--gold-500); color: #241b03; font-weight: 600; }
.aside__list--num li a:hover { color: var(--gold-600); }
.aside__list--num li .date { flex: none; font-size: 12px; color: var(--muted-2); }

/* 栏目目录 */
.aside__cats li { border-bottom: 1px dashed var(--border); }
.aside__cats li:last-child { border-bottom: 0; }
.aside__cats li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px;
  font-size: 13.5px;
  color: var(--text);
}
.aside__cats li a .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aside__cats li a .count {
  flex: none;
  min-width: 22px;
  padding: 1px 6px;
  background: var(--bg-soft);
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.aside__cats li a:hover { color: var(--gold-600); }
.aside__cats li a:hover .count { background: var(--gold-50); color: var(--gold-700); }
.aside__cats li.active a { color: var(--gold-700); font-weight: 600; }
.aside__cats li.active a .count { background: var(--gold-500); color: #241b03; }

/* 标签模块 */
.aside__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.aside__tags a {
  display: inline-block;
  padding: 5px 11px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--muted);
  transition: all .15s;
}
.aside__tags a:hover {
  background: var(--gold-50);
  border-color: var(--gold-400);
  color: var(--gold-700);
}
.aside__empty { font-size: 13px; color: var(--muted-2); }

/* 行情小卡 */
.ticker { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ticker .name { font-size: 14px; color: var(--text-strong); font-weight: 600; }
.ticker .price { font-size: 15px; font-weight: 700; }
.ticker .chg { font-size: 12.5px; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }

/* ==========================================================================
   行情中心 / 工具 / 百科 通用
   ========================================================================== */
.page-head { padding: 26px 0 6px; }
.page-head h1 { font-size: 26px; color: var(--text-strong); }
.page-head p { color: var(--muted); margin-top: 6px; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 18px; color: var(--text-strong); margin-bottom: 16px; padding-left: 10px; border-left: 4px solid var(--gold-500); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* 行情表 */
.quote-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.quote-table th, .quote-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.quote-table th { background: var(--navy-800); color: #fff; font-weight: 600; }
.quote-table tr:hover td { background: var(--bg-soft); }
.range-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.range-tabs button {
  padding: 6px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.range-tabs button.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.chart-wrap { height: 360px; position: relative; }

/* 工具表单 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.form-row input, .form-row select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-strong);
  outline: none;
  background: #fff;
}
.form-row input:focus { border-color: var(--gold-500); }
.btn {
  display: inline-block;
  height: 42px;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  background: var(--gold-500);
  color: #241b03;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--gold-400); }
.btn.primary { background: var(--navy-800); color: #fff; }
.btn.primary:hover { background: var(--navy-700); }
.result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--gold-50);
  border: 1px solid var(--gold-300);
  font-size: 14px;
  color: #6b4f0e;
  line-height: 1.8;
}
.result b { color: var(--gold-700); }

/* 百科 */
.ency-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.ency-nav a {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  color: var(--muted);
}
.ency-nav a.active, .ency-nav a:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.term { padding: 16px 0; border-bottom: 1px solid var(--border); }
.term:last-child { border-bottom: none; }
.term h3 { font-size: 16px; color: var(--text-strong); margin-bottom: 4px; }
.term h3 .en { color: var(--gold-600); font-size: 13px; margin-left: 6px; }
.term p { font-size: 14px; color: var(--muted); }

/* ==========================================================================
   搜索结果
   ========================================================================== */
.search-result { padding: 16px 0; border-bottom: 1px solid var(--border); }
.search-result h3 { font-size: 16px; margin-bottom: 4px; }
.search-result h3 a { color: var(--text-strong); }
.search-result h3 a:hover { color: var(--gold-600); }
.search-result .cat { font-size: 12px; color: var(--gold-600); }
.search-result p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  background: var(--navy-900);
  color: #8fa0b3;
  margin-top: 20px;
  padding: 40px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-grid a { display: block; color: #8fa0b3; font-size: 13px; padding: 4px 0; }
.footer-grid a:hover { color: var(--gold-300); }
.footer-brand p { font-size: 13px; margin-top: 10px; line-height: 1.7; }
.footer-bottom {
  padding-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: #5f7185;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .layout { flex-wrap: wrap; }
  .aside {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    align-items: start;
  }
  .aside__box { margin-bottom: 0; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .header-search input { width: 150px; }
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  .toc { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 8px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .article { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .toc, .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .header-search input { display: none; }
}
/* ==========================================================================
   首页 · 本月优质交易商榜单
   ========================================================================== */
.rank { background: #f6f7f9; padding: 30px 0 34px; }
.rank__head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 18px;
}
.rank__head h2 { font-size: 22px; color: var(--text-strong); font-weight: 700; }
.rank__head h2 span { color: var(--gold-600); }
.rank__head .rank__date { margin-left: auto; font-size: 13px; color: var(--muted); }
.rank__note { margin-top: 12px; font-size: 12px; color: var(--muted-2); text-align: right; }

.rank-card {
  display: flex; align-items: stretch; gap: 20px;
  background: #fff; border: 1px solid #e8eaee; border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(22, 30, 40, .04);
}
.rank-card + .rank-card { margin-top: 14px; }
.rank-card:hover { border-color: var(--gold-400); box-shadow: 0 4px 14px rgba(201, 162, 39, .12); }

/* 左侧:logo + 网友评分 */
.rank-card__side {
  flex: 0 0 150px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  border-right: 1px dashed #e8eaee; padding-right: 20px;
}
.rank-card__logo {
  position: relative; width: 110px; height: 74px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid #eef0f3; border-radius: 8px; overflow: hidden;
  font-weight: 700; color: var(--text-strong); font-size: 15px; text-align: center;
  background: #fbfcfd;
}
.rank-card__logo small { font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.rank-card__logo .hot {
  position: absolute; top: 0; right: 0;
  background: #e5482e; color: #fff; font-size: 10px; line-height: 1;
  padding: 3px 5px; border-radius: 0 0 0 6px; font-style: normal;
}
.rank-card__score-label { font-size: 12px; color: var(--muted); }
.rank-card__score-bar {
  width: 84px; height: 6px; border-radius: 3px; background: #eef0f3; overflow: hidden;
}
.rank-card__score-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); }
.rank-card__score { font-size: 22px; font-weight: 700; color: var(--gold-600); line-height: 1; }
.rank-card__score small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }

/* 中部:主体信息 */
.rank-card__main { flex: 1 1 auto; min-width: 0; }
.rank-card__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-card__name .no {
  width: 20px; height: 20px; border-radius: 5px; flex: 0 0 20px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rank-card__name strong { font-size: 17px; color: var(--text-strong); }
.rank-card__name .zt {
  font-style: normal; font-size: 11px; color: #fff;
  background: var(--gold-500); border-radius: 3px; padding: 2px 6px; line-height: 1;
}
.rank-card__meta {
  margin-top: 8px; font-size: 12.5px; color: var(--muted);
  background: #f6f7f9; border-radius: 4px; padding: 4px 8px;
  display: inline-block;
}
.rank-card__tags { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.rank-card__tags span {
  font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 4px;
  color: var(--gold-600); background: var(--gold-50); border: 1px solid var(--gold-300);
}
.rank-card__desc { margin: 10px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.rank-card__stats { margin-top: 10px; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted-2); }

/* 右侧:操作按钮 */
.rank-card__act {
  flex: 0 0 128px; display: flex; flex-direction: column;
  justify-content: center; gap: 10px;
}
.rank-card__act a {
  display: block; text-align: center; text-decoration: none;
  font-size: 14px; border-radius: 6px; padding: 9px 0; line-height: 1;
  transition: all .15s ease;
}
.rank-card__act .ghost { border: 1px solid #d6d9df; color: var(--text-strong); background: #fff; }
.rank-card__act .ghost:hover { border-color: var(--gold-500); color: var(--gold-600); }
.rank-card__act .solid { border: 1px solid var(--gold-500); color: #fff; background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); font-weight: 600; }
.rank-card__act .solid:hover { filter: brightness(1.05); }

@media (max-width: 900px) {
  .rank-card { flex-wrap: wrap; }
  .rank-card__side { flex: 0 0 120px; padding-right: 14px; }
  .rank-card__act {
    flex: 1 1 100%; flex-direction: row;
  }
  .rank-card__act a { flex: 1; }
}
@media (max-width: 560px) {
  .rank { padding: 22px 0 26px; }
  .rank__head { flex-wrap: wrap; }
  .rank__head h2 { font-size: 19px; }
  .rank-card { padding: 16px; gap: 14px; }
  .rank-card__side {
    flex: 1 1 100%; flex-direction: row; justify-content: flex-start;
    border-right: 0; border-bottom: 1px dashed #e8eaee;
    padding: 0 0 12px; gap: 14px;
  }
  .rank-card__logo { width: 96px; }
  .rank-card__score-box { display: flex; flex-direction: column; gap: 4px; }
}

/* ==========================================================================
   万洲金业扩展模块（首页：介绍 / 问答 / 最新文章；文章页：表格、提示、相关阅读）
   ========================================================================== */
.bc-label { color: var(--muted-2); margin-right: 4px; }
/* WordPress wp_nav_menu 输出的 ul/li 与原站 a 直接排列保持同版式 */
.main-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li { list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li > a.current-menu-item,
.main-nav > ul > li > a[aria-current="page"] { color: var(--gold-300); background: var(--navy-800); font-weight: 600; }
.site-header__bar form.header-search { display: flex; flex: none; }
.header-search input[type="search"] {
  width: 180px; height: 36px; padding: 0 12px; border: 1px solid var(--navy-600);
  border-right: 0; border-radius: 6px 0 0 6px; background: var(--navy-800);
  color: #fff; outline: none; font-size: 13.5px;
}
.header-search input::placeholder { color: var(--muted-2); }
.header-search button {
  height: 36px; padding: 0 14px; border: 0; border-radius: 0 6px 6px 0;
  background: var(--gold-500); color: #241b03; font-weight: 700; cursor: pointer; font-size: 13.5px;
}
.header-search button:hover { background: var(--gold-400); }

/* --- 万洲介绍 --- */
.intro__lead {
  margin: 16px 0 0; padding: 14px 18px; background: var(--gold-50);
  border-left: 4px solid var(--gold-500); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text); font-size: 15px; line-height: 1.85;
}
.intro__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px; margin-top: 18px;
}
.intro__card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s;
}
.intro__card:hover { box-shadow: var(--shadow); border-color: var(--gold-400); }
.intro__card .ico {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; background: var(--gold-50); margin-bottom: 12px;
}
.intro__card h3 { font-size: 16.5px; color: var(--text-strong); margin-bottom: 8px; }
.intro__card p { font-size: 13.8px; color: var(--muted); line-height: 1.8; }
.risk-note {
  margin-top: 18px; padding: 14px 18px; background: #fff7ed;
  border: 1px solid #f6d9b0; border-left: 4px solid #e59a2b; border-radius: var(--radius);
  font-size: 13.6px; color: #7a5c10;
}
.risk-note strong { display: block; margin-bottom: 4px; font-size: 14px; }
.risk-note p { margin: 0; line-height: 1.8; }

/* --- 万洲问答 --- */
.faq__list { margin-top: 18px; display: grid; gap: 10px; }
.faq__item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq__item[open] { border-color: var(--gold-400); box-shadow: var(--shadow-sm); }
.faq__q {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  cursor: pointer; font-weight: 600; color: var(--text-strong); font-size: 15px;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "＋"; margin-left: auto; color: var(--gold-600); font-size: 18px; }
.faq__item[open] .faq__q::after { content: "－"; }
.faq__q:hover { background: var(--gold-50); }
.faq__mark {
  flex: none; width: 24px; height: 24px; border-radius: 6px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
  background: var(--navy-800); color: var(--gold-300);
}
.faq__mark--a { background: var(--gold-500); color: #241b03; }
.faq__a { display: flex; gap: 12px; padding: 0 18px 16px 18px; font-size: 14px; line-height: 1.9; color: var(--text); }
.faq__a p { margin: 0; }
.faq__foot { margin-top: 14px; font-size: 13px; color: var(--muted-2); }

/* --- 最新文章 --- */
.latest__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.post-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gold-400); }
.post-card__cat { display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 20px;
  background: var(--gold-50); color: var(--gold-700); font-size: 12px; font-weight: 600; }
.post-card h3 { font-size: 17px; margin: 12px 0 8px; color: var(--text-strong); line-height: 1.5; }
.post-card__desc { font-size: 13.6px; color: var(--muted); line-height: 1.75; flex: 1; }
.post-card__meta { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--muted-2); }
.latest__note { margin-top: 12px; font-size: 12.5px; color: var(--muted-2); }

/* --- 正文增强 --- */
.article__body aside.note, .article__body .note {
  margin: 20px 0; padding: 14px 18px; background: var(--gold-50);
  border-left: 4px solid var(--gold-500); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.8px; color: #6b4f0e; line-height: 1.85;
}
.article__body .tbl { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.article__body .tbl th, .article__body .tbl td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.article__body .tbl th { background: var(--navy-800); color: #fff; font-weight: 600; }
.article__body .tbl tr:nth-child(even) td { background: var(--bg-soft); }
.article__body .formula {
  margin: 14px 0; padding: 12px 16px; background: var(--bg-soft);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  font-family: Consolas, Monaco, monospace; font-size: 14px; color: var(--navy-700);
}
.article__tags { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; }
.article__tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px;
  background: var(--bg-soft); border-radius: 20px; color: var(--muted); }
.related { margin-top: 28px; }
.related h2 { font-size: 19px; margin-bottom: 12px; color: var(--text-strong); }
.related__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related__list a { display: block; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.related__list a:hover { border-color: var(--gold-400); }

/* --- 单页排版 --- */
.prose { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; margin: 10px 0 30px; box-shadow: var(--shadow-sm); }
.prose h2 { font-size: 20px; color: var(--text-strong); margin: 26px 0 12px;
  padding-left: 12px; border-left: 4px solid var(--gold-500); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 15px; line-height: 1.9; color: var(--text); }
.prose ul { margin: 12px 0 12px 22px; list-style: disc; }
.prose li { margin-bottom: 8px; }
.page-head p { max-width: 820px; }
.site-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.site-map a { display: block; padding: 14px 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); }
.site-map strong { display: block; color: var(--text-strong); margin-bottom: 4px; }
.site-map span { font-size: 13px; color: var(--muted); }
.footer-brand .footer-risk { margin-top: 10px; font-size: 12.5px; color: #a9b9cb; }
.error-page { text-align: center; padding: 70px 20px 90px; }
.error-page h1 { font-size: 76px; color: var(--navy-700); line-height: 1; }
.error-page p { margin: 14px 0 24px; color: var(--muted); }

@media (max-width: 900px) {
  .header-search { display: none !important; }
  .intro__grid, .latest__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .intro__grid, .latest__grid, .related__list, .site-map { grid-template-columns: 1fr; }
  .section__head { flex-wrap: wrap; gap: 8px; }
  .prose { padding: 18px; }
}

/* ==========================================================================
   行情中心 / 投资工具 页面美化（page-market / page-tools）
   ========================================================================== */
.page-head--fancy {
  padding: 26px 0 22px;
  background: linear-gradient(180deg, #ffffff, #f5f7fa);
  border-bottom: 1px solid var(--border);
}
.page-head--fancy h1 { display: flex; align-items: center; gap: 12px; }
.page-head--fancy .ph-ico {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-50); border: 1px solid var(--gold-100);
  border-radius: 12px; font-size: 22px;
}

/* 正文增强：列表改为浅底卡片 + 金色标记 */
.prose--fancy ul { list-style: none; margin: 14px 0; padding: 0; }
.prose--fancy ul li {
  position: relative;
  margin: 0 0 10px;
  padding: 11px 16px 11px 38px;
  background: var(--bg-soft);
  border-radius: 10px;
  list-style: none;
  transition: background .15s;
}
.prose--fancy ul li:hover { background: var(--gold-50); }
.prose--fancy ul li::before {
  content: "◆";
  position: absolute; left: 16px; top: 13px;
  color: var(--gold-500); font-size: 12px;
}
.prose--fancy h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 30px 0 14px; padding-left: 0; border-left: 0;
}
.prose--fancy h2::before {
  content: "";
  width: 4px; height: 18px; flex: none;
  background: var(--gold-500); border-radius: 2px;
}

/* 表格美化：深蓝表头 + 斑马纹 + 悬停高亮 + 圆角 */
.prose--fancy .tbl {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  margin: 18px 0; font-size: 14px;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.prose--fancy .tbl th:first-child { border-top-left-radius: 11px; }
.prose--fancy .tbl th:last-child  { border-top-right-radius: 11px; }
.prose--fancy .tbl tr:last-child td:first-child { border-bottom-left-radius: 11px; }
.prose--fancy .tbl tr:last-child td:last-child  { border-bottom-right-radius: 11px; }
.prose--fancy .tbl th,
.prose--fancy .tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.prose--fancy .tbl tr:last-child td { border-bottom: 0; }
.prose--fancy .tbl th {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; font-weight: 600; white-space: nowrap;
}
.prose--fancy .tbl td { color: var(--text); line-height: 1.7; }
.prose--fancy .tbl td:first-child { font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.prose--fancy .tbl tr:hover td { background: var(--gold-50); }

/* 提示块（正文 aside.note 在页面里同样生效） */
.prose--fancy aside.note, .prose--fancy .note {
  margin: 20px 0 6px; padding: 14px 18px; background: var(--gold-50);
  border-left: 4px solid var(--gold-500); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.8px; color: #6b4f0e; line-height: 1.85;
}

/* 热门标签模块 */
.page-tags {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 4px 0 30px;
  box-shadow: var(--shadow-sm);
}
.page-tags h4 {
  font-size: 15px; color: var(--text-strong);
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.page-tags h4 .ico { color: var(--gold-500); }

/* 学习计算器 */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 4px 0 14px;
}
.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold-500);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.calc-card h3 { font-size: 15px; color: var(--text-strong); margin-bottom: 12px; }
.calc-card label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.calc-card input {
  display: block; width: 100%; margin-top: 6px;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text-strong); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.calc-card input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201, 162, 39, .15); }
.calc-result {
  margin-top: 4px; padding: 10px 12px;
  background: var(--gold-50); border-radius: 8px;
  font-size: 13px; color: var(--gold-700);
}
.calc-result strong { font-size: 17px; }
.calc-note { font-size: 12.5px; color: var(--muted-2); margin-bottom: 24px; }

@media (max-width: 620px) {
  .page-head--fancy .ph-ico { width: 38px; height: 38px; font-size: 18px; }
  .prose--fancy .tbl { font-size: 13px; }
  .prose--fancy .tbl th, .prose--fancy .tbl td { padding: 9px 10px; }
  .prose--fancy ul li { padding: 10px 12px 10px 34px; }
}
