/*
Theme Name: 海外仓内卷网
Description: 海外仓名录与报价内卷榜。设计系统与原型 warehouse-roll 一致；数据、内卷指数 IRI 与环比由 wroll-core 插件提供，本主题只负责渲染。
Version: 2.5.2
Requires at least: 6.0
Requires PHP: 7.4
Author: 海外仓内卷网
License: GPL-2.0-or-later
Text Domain: wroll
*/

/* =========================================================================
 * 海外仓内卷网 — 设计系统 (style.css)
 * 浅色主题 / 数据密集型信息架构 / 中文排版优化
 * ========================================================================= */

:root {
  /* 中性色阶 */
  --ink:        #0f141d;
  --ink-2:      #2b3440;
  --muted:      #5d6875;
  --muted-2:    #8a94a2;
  --line:       #e4e8ee;
  --line-2:     #eef1f5;
  --bg:         #f6f7f9;
  --card:       #ffffff;
  --card-soft:  #fafbfc;

  /* 品牌色：内卷红 */
  --red:        #d33a26;
  --red-dark:   #b32e1c;
  --red-soft:   #fdf1ef;
  --red-line:   #f6d5cf;

  /* 功能色 */
  --teal:       #0d7a6f;
  --teal-soft:  #edf7f5;
  --blue:       #1f5fd0;
  --blue-soft:  #eef4fe;
  --amber:      #a86a00;
  --amber-soft: #fdf6e7;

  /* 度量 */
  --wrap: 1240px;
  --r:    10px;
  --r-sm: 6px;
  --shadow:   0 1px 2px rgba(15,20,29,.04), 0 4px 14px rgba(15,20,29,.05);
  --shadow-lg:0 2px 6px rgba(15,20,29,.06), 0 18px 46px rgba(15,20,29,.10);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "HarmonyOS Sans SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; }

/* ============================== 顶部导航 ============================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--red) 0%, #e2603f 100%);
  color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(211,58,38,.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; }
.brand-sub  { font-size: 10.5px; color: var(--muted-2); letter-spacing: .06em; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 7px 12px; border-radius: var(--r-sm); font-size: 13.5px;
  color: var(--ink-2); font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.active { background: var(--red-soft); color: var(--red); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.hint-chip {
  font-size: 11.5px; color: var(--amber); background: var(--amber-soft);
  border: 1px solid #f0e2bf; padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}

/* ================================ 按钮 ================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all .14s ease;
}
.btn:hover { border-color: var(--muted-2); color: var(--ink); }
.btn-primary {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 2px 10px rgba(211,58,38,.24);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-lg { padding: 11px 22px; font-size: 14.5px; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* ================================ 首屏 ================================ */
.hero {
  background:
    radial-gradient(1100px 340px at 12% -10%, #fff4f1 0%, rgba(255,244,241,0) 62%),
    radial-gradient(900px 300px at 88% 0%, #eef4fe 0%, rgba(238,244,254,0) 58%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: var(--wrap); margin: 0 auto; padding: 54px 20px 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--red); background: var(--red-soft); border: 1px solid var(--red-line);
  padding: 4px 11px; border-radius: 20px; margin-bottom: 16px;
}
.hero h1 {
  font-size: 38px; line-height: 1.2; letter-spacing: -.03em; max-width: 900px;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero-lead {
  margin-top: 14px; font-size: 15.5px; color: var(--muted); max-width: 760px; line-height: 1.75;
}
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* 站内搜索 */
.searchbar {
  margin-top: 26px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 8px;
  display: flex; gap: 8px; max-width: 780px;
}
.searchbar input {
  flex: 1; border: 0; outline: 0; padding: 10px 12px; font-size: 14.5px;
  font-family: inherit; color: var(--ink); background: transparent;
}
.searchbar input::placeholder { color: var(--muted-2); }
.search-tips { margin-top: 10px; font-size: 12.5px; color: var(--muted-2); }
.search-tips b { color: var(--ink-2); font-weight: 600; }
.search-tips a { color: var(--blue); }

/* ============================ 数据看板 ============================ */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 0; border-top: 1px solid var(--line); background: #fff;
}
.stat {
  padding: 20px 22px; border-right: 1px solid var(--line-2);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-num small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ============================== 区块 ============================== */
.section { padding: 46px 0 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.section-head h2 { font-size: 21px; letter-spacing: -.02em; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 720px; }
.section-more { font-size: 13px; color: var(--blue); font-weight: 600; white-space: nowrap; }
.section-more:hover { color: var(--blue); text-decoration: underline; }

/* ============================== 卡片 ============================== */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h3 { font-size: 15px; }

/* 大区卡 */
.grid-region { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.region-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow); transition: all .16s ease; display: block;
}
.region-card:hover { border-color: var(--red-line); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.region-card .rc-top { display: flex; align-items: baseline; justify-content: space-between; }
.region-card h3 { font-size: 16.5px; }
.region-card .rc-count { font-size: 12.5px; color: var(--muted); }
.region-card .rc-count b { color: var(--red); font-size: 15px; font-weight: 800; }
.region-card p { margin: 8px 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; min-height: 40px; }
.region-card .rc-flags { font-size: 15px; letter-spacing: 2px; }

/* 服务能力卡 */
.grid-svc { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(196px, 100%), 1fr)); gap: 12px; }
.svc-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 15px; transition: all .15s ease; display: block;
}
.svc-card:hover { border-color: var(--red-line); background: var(--red-soft); }
.svc-card .sc-name { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.svc-card .sc-count { font-size: 11.5px; color: var(--red); font-weight: 700; }
.svc-card p { margin: 5px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ============================== 徽章 ============================== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.5;
}
.badge-a { color: var(--teal); background: var(--teal-soft); border-color: #cfe8e4; }
.badge-b { color: var(--blue); background: var(--blue-soft); border-color: #d5e3fb; }
.badge-c { color: var(--muted); background: #f1f3f6; border-color: #e0e4ea; }
.badge-hot { color: #fff; background: var(--red); border-color: var(--red); }
.badge-hi  { color: var(--amber); background: var(--amber-soft); border-color: #f0e2bf; }
.badge-tag { color: var(--ink-2); background: #f2f4f7; border-color: #e5e9ef; font-weight: 600; }
.badge-lv-core { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }

.badge-row { display: flex; flex-wrap: wrap; gap: 5px; }

/* ============================== 表格 ============================== */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--card-soft); position: sticky; top: 0;
}
table.data td {
  padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle;
}
table.data tbody tr:hover { background: #fcfdfe; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .rank-cell { width: 46px; text-align: center; font-weight: 800; color: var(--muted-2); }
table.data tr.top1 .rank-cell { color: var(--red); }
table.data tr.top1 { background: var(--red-soft); }
table.data tr.top1:hover { background: #fce9e6; }
.wh-link { font-weight: 700; color: var(--ink); }
.wh-link:hover { color: var(--red); }
.sub-line { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

.price-best { color: var(--red); font-weight: 800; }
.delta-down { color: var(--red); font-weight: 700; font-size: 11.5px; }
.delta-up   { color: var(--teal); font-weight: 700; font-size: 11.5px; }

/* ============================== 名录页 ============================== */
.layout-side {
  display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 22px; align-items: start;
  padding-top: 26px;
}
.filter-panel { position: sticky; top: 78px; }
.filter-head {
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
}
.filter-head h3 { font-size: 14px; }
.filter-reset { font-size: 12px; color: var(--blue); cursor: pointer; font-weight: 600; }
.filter-body { max-height: calc(100vh - 170px); overflow-y: auto; }
.fgroup { padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > h4 {
  font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 9px;
  letter-spacing: .04em;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12.5px; padding: 4px 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  user-select: none; transition: all .12s ease;
}
.chip:hover { border-color: var(--muted-2); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.chip .c-n { opacity: .55; margin-left: 3px; font-size: 11px; }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; flex-wrap: wrap;
}
.toolbar .tb-count { font-size: 13px; color: var(--muted); }
.toolbar .tb-count b { color: var(--ink); font-size: 15px; font-weight: 800; }
.sorts { display: flex; gap: 4px; flex-wrap: wrap; }
.sort-btn {
  font-size: 12.5px; padding: 5px 11px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-family: inherit;
}
.sort-btn:hover { border-color: var(--muted-2); }
.sort-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* 结果列表 */
.wh-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.wh-item {
  border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) 214px; gap: 20px;
  transition: all .15s ease;
}
.wh-item:hover { border-color: var(--red-line); box-shadow: var(--shadow); }
.wh-item h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wh-meta { margin-top: 7px; font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.wh-meta span { display: inline-flex; align-items: center; gap: 4px; }
.wh-tags { margin-top: 10px; }
.wh-note {
  margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.6;
  background: var(--card-soft); border-left: 3px solid var(--line);
  padding: 8px 11px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.wh-hl { font-size: 12.5px; color: var(--red); font-weight: 600; margin-top: 8px; }
.wh-price-box { border-left: 1px solid var(--line-2); padding-left: 18px; }
.wh-price-box .pz-row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12.5px; padding: 3.5px 0;
}
.wh-price-box .pz-row span:first-child { color: var(--muted); }
.wh-price-box .pz-row b { font-size: 14px; font-weight: 700; }
.idx-badge {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line);
}
.idx-badge .ib-label { font-size: 12px; color: var(--muted); }
.idx-badge .ib-val {
  font-size: 21px; font-weight: 800; color: var(--red); letter-spacing: -.02em;
}

/* 内卷指数条 */
.idx-bar { height: 5px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.idx-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #e07a5f, var(--red)); border-radius: 4px; }

.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }

/* ============================== 详情页 ============================== */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; padding-top: 24px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--red); }
.detail-title { font-size: 25px; letter-spacing: -.025em; }
.detail-sub { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 0; }
.kv { padding: 15px 18px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-size: 17px; font-weight: 700; margin-top: 3px; }
.kv .v small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }

.price-table td { font-variant-numeric: tabular-nums; }
.price-table .pf-name { color: var(--ink-2); }
.price-table .pf-name b { display: block; font-weight: 600; }
.price-table .pf-name small { color: var(--muted-2); font-size: 11.5px; }
.price-table td.pf-val { text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; }
.price-table td.pf-val.best { color: var(--red); }
.price-table .pf-unit { color: var(--muted-2); font-size: 11.5px; font-weight: 500; margin-left: 3px; }

.notice {
  border-radius: var(--r-sm); padding: 12px 15px; font-size: 12.5px; line-height: 1.7;
  border: 1px solid; display: flex; gap: 9px;
}
.notice-warn { background: var(--amber-soft); border-color: #f0e2bf; color: #6b4a00; }
.notice-info { background: var(--blue-soft); border-color: #d5e3fb; color: #143d85; }
.notice-demo { background: #f4f5f7; border-color: var(--line); color: var(--muted); }
.notice .n-ico { flex: none; font-size: 14px; }

.dim-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 78px; gap: 12px; align-items: center; padding: 7px 0; }
.dim-row .dr-label { font-size: 12.5px; color: var(--ink-2); }
.dim-row .dr-val { font-size: 12.5px; text-align: right; font-weight: 700; }

/* 询盘表单 */
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: #fff; outline: 0;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(211,58,38,.08); }
.form-row textarea { resize: vertical; min-height: 78px; }
.form-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.6; }

.toast {
  display: none; margin-top: 12px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--teal-soft); border: 1px solid #cfe8e4; color: var(--teal);
  font-size: 13px; font-weight: 600;
}
.toast.show { display: block; }

/* ============================== 榜单页 ============================== */
.weights-panel { padding: 18px 20px; }
.weight-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 56px; gap: 14px; align-items: center; margin-bottom: 11px; }
.weight-row .wr-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.weight-row input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px;
  background: #e7eaf0; outline: 0;
}
.weight-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(211,58,38,.5);
}
.weight-row input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--red);
  cursor: pointer; border: 2px solid #fff;
}
.weight-row .wr-val { font-size: 13px; font-weight: 800; text-align: right; color: var(--red); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 16px; }
.tab {
  padding: 11px 15px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--red); border-bottom-color: var(--red); }

/* ============================== 网络页 ============================== */
.tree { display: grid; gap: 16px; }
.tree-region { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.tree-region > header {
  padding: 14px 18px; background: var(--card-soft); border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
}
.tree-region > header h3 { font-size: 16px; }
.tree-region > header .tr-stat { font-size: 12.5px; color: var(--muted); }
.tree-body { padding: 16px 18px; display: none; }
.tree-region.open .tree-body { display: block; }
.country-block { margin-bottom: 16px; }
.country-block:last-child { margin-bottom: 0; }
.country-block > .cb-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 9px;
  font-size: 14px; font-weight: 700;
}
.country-block > .cb-head .cb-n { font-size: 12px; color: var(--muted); font-weight: 500; }
.city-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.city-box { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; background: var(--card-soft); }
.city-box .cb-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; display: flex; justify-content: space-between; }
.city-box .cb-title span { color: var(--muted-2); font-size: 11.5px; font-weight: 500; }
.city-box ul { margin: 0; padding: 0; list-style: none; }
.city-box li { font-size: 12.5px; padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; }
.city-box li a { color: var(--ink-2); }
.city-box li a:hover { color: var(--red); }
.city-box li .li-price { color: var(--muted-2); font-size: 11.5px; white-space: nowrap; }

/* 柱状小图 */
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 84px; gap: 12px; align-items: center; font-size: 12.5px; }
.bar-track { height: 16px; background: #f1f3f6; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #f0a58e, var(--red)); border-radius: 3px; }
.bar-row .bv { text-align: right; font-weight: 700; }

/* ============================== 页脚 ============================== */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 34px 20px 26px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px;
}
.footer-inner h4 { font-size: 13px; margin-bottom: 11px; }
.footer-inner ul { margin: 0; padding: 0; list-style: none; }
.footer-inner li { margin-bottom: 7px; }
.footer-inner li a { font-size: 12.5px; color: var(--muted); }
.footer-brand p { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin: 10px 0 0; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--line-2); padding: 14px 20px; max-width: var(--wrap);
  margin: 0 auto; font-size: 11.5px; color: var(--muted-2); display: flex;
  justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ============================== 工具类 ============================== */
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; } .mb0 { margin-bottom: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr);}
.hide { display: none !important; }

/* ============================== 响应式 ============================== */
@media (max-width: 1080px) {
  .layout-side { grid-template-columns: minmax(0, 1fr); }
  .filter-panel { position: static; }
  .filter-body { max-height: none; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .hero h1 { font-size: 28px; }
  .hero-inner { padding: 36px 20px 30px; }
  .wh-item { grid-template-columns: minmax(0, 1fr); }
  .wh-price-box { border-left: 0; border-top: 1px solid var(--line-2); padding-left: 0; padding-top: 14px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .stat-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat { border-bottom: 1px solid var(--line-2); }
}


/* =========================================================================
 * WordPress 适配层
 * 原型是静态页，这里补齐跑在 WP 上需要、但静态页不需要的部分。
 * 上面的设计令牌与组件样式与原型逐行一致，未做任何改动。
 * ========================================================================= */

img { max-width: 100%; height: auto; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* 登录后台时顶部工具条的占位 */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* 分页 */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0 8px; }
.pagination .page-numbers {
  display: inline-block; padding: 7px 12px; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink-2); background: #fff;
}
.pagination .page-numbers:hover { border-color: var(--muted-2); }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }

/* 空状态 */
.wroll-empty {
  padding: 46px 20px; text-align: center; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.wroll-empty b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 6px; }

/* 后台编辑器写出来的正文，在详情页要能看 */
.wh-content > p { margin: 0 0 14px; line-height: 1.85; font-size: 14px; color: var(--ink-2); }
.wh-content h2, .wh-content h3 { margin: 22px 0 10px; font-size: 16px; color: var(--ink); }
.wh-content ul, .wh-content ol { margin: 0 0 14px; padding-left: 20px; }
.wh-content li { margin: 0 0 6px; line-height: 1.8; font-size: 14px; color: var(--ink-2); }

/* 环比徽章 */
.delta { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.delta--good { color: #0d7a6f; background: #edf7f5; }
.delta--bad  { color: #b32e1c; background: #fdf1ef; }
.delta--flat { color: #8a94a2; background: #f6f7f9; }


/* =========================================================================
 * 六页模板适配层（v2.1）
 *
 * 原型是静态页：筛选 chip、排序按钮都是 <span> + JS 事件。这里改成服务端
 * 渲染后，同样的外观由 <a> 承担，所以补上链接必需的两条声明 ——
 * 设计令牌与组件样式本身一行未改。
 * ====================================================================== */

a.chip,
a.sort-btn { display: inline-block; text-decoration: none; }
a.chip:hover,
a.sort-btn:hover { text-decoration: none; }
a.chip:focus-visible,
a.sort-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* 列表卡片里的指数环比 / 单价环比 */
.idx-delta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-bottom: 10px; }
.pz-delta { font-size: 11px; margin: -3px 0 5px; text-align: right; }

/* 首屏副标题里的重点词（原型用 <em>，默认斜体在中文里不好看） */
.hero-lead em { font-style: normal; font-weight: 700; color: var(--ink); }

/* 详情页报价表：未提供的项不要抢视觉 */
.price-table td.pf-val:empty { color: var(--muted-2); }

/* 服务能力矩阵行的最后一条去边框（PHP 循环输出，用 :last-child 兜） */
.card-pad > div[style*='border-bottom:1px solid var(--line-2)']:last-child { border-bottom: 0 !important; }


/* =========================================================================
 * 移动端（v2.2）
 *
 * 原型是桌面演示站，760px 断点只写了 .nav { display: none }，没有替代导航，
 * 也没处理页头右侧的提示 chip —— 在真机上会横向溢出、且用户无法切换页面。
 * 这里补齐三件事：
 *   1. 导航改成可横滚的单行标签栏（5 个入口，不需要汉堡菜单那么重）
 *   2. 隐藏纯装饰的 hint-chip（167px，正是溢出的来源）
 *   3. flex 子项补 min-width: 0 —— 否则宽表格会把容器撑开，
 *      让 .table-scroll 的 overflow-x: auto 失效
 * ====================================================================== */

/* 桌面也要：flex 子项默认可被内容撑大，表格页尤其明显 */
.stack,
.stack > * { min-width: 0; }
.table-scroll { max-width: 100%; min-width: 0; }

@media (max-width: 760px) {

	/* 页头在移动端是两行（品牌行 + 导航行），而原型给 .header-inner 写死了
	   height: 62px —— 导航折到第二行后内容需要 90px，超出的部分会伸出容器；
	   又因为 .site-header 是 sticky 且 overflow 可见，导航下半部分会浮在
	   页面内容之上。改为按内容撑高。 */
	.header-inner {
		flex-wrap: wrap;
		row-gap: 0;
		height: auto;
		min-height: 62px;
		padding-bottom: 6px;
	}

	/* 纯装饰，移动端不占位 */
	.hint-chip { display: none !important; }

	/* 导航的移动端规则统一在文件末尾的 v2.5 节定义。
	   历史上 v2.2 与 v2.4 各写过一套（一套横滚、一套折行），后定义的会压掉前面的，
	   排查时极易误判 —— 所以只留一处。 */

	.header-actions { margin-left: auto; }

	/* 表格本身保持可横滚，不要让它撑开页面 */
	.table-scroll { overflow-x: auto; }

	/* 权重滑块一行放不下时，标签与数值换行排 */
	.weight-row { grid-template-columns: minmax(0, 1fr) 46px !important; row-gap: 2px; }
	.weight-row .wr-name { grid-column: 1 / -1; }
	.weight-row input[type=range] { grid-column: 1; }
	.weight-row .wr-val { grid-column: 2; }

	/* 工具栏：家数与排序按钮各占一行 */
	.toolbar { gap: 8px; }
	.sorts { width: 100%; }
}


/* -------------------------------------------------------------------------
 * 两栏区块与横向标签栏的移动端处理（v2.3）
 *
 * 原型把「算法说明」这类两栏比例（1.1fr .9fr）直接写在行内样式里，
 * 760px 以下不会折行，右栏会被压到 135px 并溢出。这里抽成类统一处理。
 * #scope-tabs 有 8 个标签（全站 + 7 大区），窄屏放不下，改成横向滚动 ——
 * 保持单行语义，比折成两行更像标签栏。
 * ---------------------------------------------------------------------- */

.split-2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; align-items: start; }
.fgrid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }

@media (max-width: 760px) {
	.split-2,
	.fgrid-2 { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }

	.tabs {
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.tabs::-webkit-scrollbar { display: none; }
	.tab { flex: 0 0 auto; padding: 9px 11px; font-size: 12.5px; }
}


/* =========================================================================
 * 可用性与无障碍（v2.4）
 *
 * 这一层解决的是「功能在，但用不了」的问题：手机上多选选不中、宽表关键列
 * 看不到、最后一页导航点不到、手指点不中。都是真机上才会暴露的问题。
 * ====================================================================== */

/* ---- 1. 多选控件：复选框组替代 <select multiple> ----
   <select multiple> 在触屏上没有 Ctrl / Command 可用，手机上实际无法多选；
   而仓型与服务能力恰恰是决定收录质量的关键字段。 */
.fset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.fset__legend {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(158px, 100%), 1fr));
  gap: 8px;
}
.pick {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.pick input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
}
.pick span { min-width: 0; }
.pick:hover { border-color: var(--muted-2); }
.pick input:checked + span { color: var(--red); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
/* :has() 是增强，老浏览器忽略这行即可（勾选态已由上面的 :checked + span 表达） */
.pick:has(input:checked) { border-color: var(--red); background: #fdf1ef; }

/* ---- 2. 锚点定位：吸顶页头不能把提示条盖住 ----
   提交失败后跳回 #join-form / #inquiry，若不加 scroll-margin，
   提示条会被 62px 的吸顶页头挡住，用户依然「看不到任何提示」。 */
#join-form,
#inquiry,
.notice,
.wroll-empty { scroll-margin-top: 96px; }

/* ---- 3. 失败提示条 ----
   刻意**不改** .notice-warn 的配色：站点里琥珀色 = 警示、红色 = 品牌与
   「最优」，失败提示沿用既有琥珀色即可，它已经足够醒目，也与设计语言一致。
   真正需要补的是可被读屏软件播报（role="alert"，见 wroll_tpl_notice）。 */

/* ---- 4. 涨跌配色约定（改之前先读这段） ----
   .delta-up   = 改善（青绿）
   .delta-down = 恶化（红）
   指数环比、报价环比、名次变动三处必须共用这一套语义。
   历史上名次变动那处用了反色，于是同一张表里出现「↑ 一会儿红一会儿绿」，
   看起来像随机错误。注意：这不是股票行情，红绿表达的是「对买家有利 / 不利」，
   所以不完全等同于「涨红跌绿」。 */

/* =========================================================================
 * 移动端（v2.4 增补）
 * ====================================================================== */

@media (max-width: 760px) {

	/* ---- 导航：必须是一行 ----
	   三次迭代的结论，别再改回去：
	     v2.2  单行 + 横滚      -> 390px 下第 5 项右边界到 427px，无滚动提示，用户以为没这页
	     v2.4  折行 + 居中      -> 5 项总宽 397px > 可用 350px，必然折成两行（用户反馈）
	     v2.5  压缩宽度让 5 项一行放下（360px 起），<=320px 才退化为单行横滑 + 右侧渐隐
	   宽度账（12px 字号 / 左右各 4px / gap 0 / letter-spacing -0.2px）：
	     首页 24 + 名录 60 + 榜单 60 + 仓网 48 + 数据来源 84 = 文字 276px，加内边距共约 311px
	     360px 屏可用 320px -> 余 9px；375 -> 余 24px；390 -> 余 39px */
	.nav {
		display: flex !important;
		order: 3;
		flex: 0 0 100%;
		width: 100%;
		flex-wrap: nowrap !important;      /* 关键：禁止折行，这是一行的保证 */
		overflow-x: auto !important;
		overflow-y: hidden;
		justify-content: center;
		gap: 0;
		padding: 0;
		margin-top: 2px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.nav::-webkit-scrollbar { display: none; }

	/* 只在确实溢出时才出现（由 nav.js 加类）：左对齐 + 右侧渐隐，提示还能横滑 */
	.nav.is-scrollable {
		justify-content: flex-start;
		-webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
		mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
	}

	.nav a {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0 4px;
		font-size: 12px;
		letter-spacing: -.2px;
		white-space: nowrap;
	}

	/* ---- 触控目标抬到 44px（WCAG 2.5.5 / 2.5.8） ---- */
	.chip,
	a.chip,
	.sort-btn,
	button.sort-btn,
	.tab,
	.filter-reset,
	.brand,
	.btn,
	.btn-sm,
	.btn-lg {
		min-height: 44px;
	}
	a.chip,
	a.sort-btn,
	.filter-reset,
	.brand {
		display: inline-flex;
		align-items: center;
	}
	.form-row input,
	.form-row select,
	.form-row textarea { min-height: 44px; }

	/* ---- 榜单表：12 列 → 6 列 ----
	   原来是 12 列、需要横向滚动 477px，「内卷指数」被推到屏幕外 ——
	   而那一列正是这一页存在的理由。6 个维度的原始值在手机上参考价值低
	   （详情页都能看到），先隐藏，保留：排名 / 仓库 / 地区 / 环比 / 指数 / 名次变动。 */
	#rank-table tr > *:nth-child(n+4):nth-child(-n+9) { display: none !important; }
	#rank-table th,
	#rank-table td {
		padding-left: 6px !important;
		padding-right: 6px !important;
		font-size: 12.5px;
	}
	#rank-table .sub-line { display: none; }

	/* ---- 详情页报价表：去掉「全站中位」列 ----
	   4 列在 390px 下会挤成一团；「对比」列已经表达了相对位置。 */
	.price-table tr > *:nth-child(3) { display: none !important; }

	/* ---- 权重滑块：把命中区抬到 44px ----
	   滑块视觉上只有 4px（轨道线），量出来的可点区域也就是 4px，
	   拇指在手机上根本按不住。加高元素盒、轨道仍保持细线即可。
	   注意选择器必须带上 .weight-row —— 轨道高度是
	   `.weight-row input[type=range]`（权重 0,2,1）设的，
	   只写 `input[type=range]`（0,1,1）会被它压住，改了等于没改。 */
	.weight-row input[type=range] {
		height: 44px;
		margin: 0;
	}

	/* ---- 复选框/单选框自己不参与 44px 规则 ----
	   它们的命中区由外层 .pick（70px 高）提供；如果被 .form-row input 的
	   min-height 拉成 18×44，方框会被纵向拉伸，看着就是坏的。 */
	.pick input,
	.form-row input[type=checkbox],
	.form-row input[type=radio] {
		min-height: 18px;
		height: 18px;
		width: 18px;
	}

	/* ---- 独立链接（不是正文里的行内链接）也要够大 ---- */
	.section-more,
	.filter-reset,
	.back-link {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}

	/* ---- 列表卡片：移动端把整张卡变成可点区域 ----
	   卡片标题链接原本只有 21px 高（一行文字），而它是打开详情页的唯一入口。
	   用覆盖式链接把整张卡变成命中区，比把标题撑到 44px 更合理 ——
	   后者会让 12 张卡片平白多出 200 多像素高度。
	   只在移动端启用，桌面端保留原有的文字选区行为。 */
	.wh-item {
		position: relative;
	}
	.wh-item .wh-link::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
	}

	/* ---- 首页 TOP 榜：10 列 → 5 列 ----
	   首页是流量最大的页面，原来这张表在 390px 下要横向滚 379px，
	   而「内卷指数」被推到屏幕外 —— 恰恰是这张榜存在的理由。
	   移动端只留：排名 / 海外仓 / 免仓期 / 环比 / 内卷指数。
	   隐藏的是「国家城市」（仓库名里通常已含城市）与四列明细报价
	   （点进详情页看，比在手机上挤成一条缝更有用）。 */
	.top-table tr > *:nth-child(n+3):nth-child(-n+7) { display: none !important; }

	/* ---- 长字符串（接口路径、mono 字段）允许断行，避免把表格撑出容器 ---- */
	table.data .mono {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	/* ---- 仓网分布的树形开关：这是这一页的主交互，命中区必须够大 ----
	   真实标记是 .tree-region > header[data-toggle]（见 page-network.php 与
	   network.js），不是 summary / button。之前按 summary 写的那版选择器
	   在页面里根本匹配不到任何元素，等于没生效。 */
	.tree-region > header[data-toggle] {
		min-height: 44px;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 4px 8px;
	}

	/* ---- 首页 TOP 表：还剩 11px 溢出，靠单元格内边距吃掉 ---- */
	.top-table th,
	.top-table td {
		padding-left: 5px !important;
		padding-right: 5px !important;
	}

	/* ---- 筛选面板别把整屏占满 ---- */
	.filter-body { max-height: 60vh; overflow-y: auto; }
}

@media (max-width: 420px) {
	.pick-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	#rank-table th,
	#rank-table td { padding-left: 5px !important; padding-right: 5px !important; }
}
