/* 电匠云库 · 设计系统 */
:root {
  --bg: #f3f6fc;
  --bg-soft: #eef3fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5fb;
  --ink: #0b1220;
  --ink-2: #46536b;
  --ink-3: #8592a8;
  --line: #e3e9f3;
  --line-2: #d3dced;
  --brand: #1d4ed8;
  --brand-2: #2563eb;
  --brand-soft: #e8efff;
  --sky: #0ea5e9;
  --sky-soft: #e3f5fe;
  --copper: #b45309;
  --copper-soft: #fdf3e3;
  --ok: #07875a;
  --ok-soft: #e3f7ef;
  --warn: #c2410c;
  --danger: #dc2626;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-2: 0 2px 6px rgba(15, 23, 42, .05), 0 18px 40px -22px rgba(15, 23, 42, .25);
  --shadow-3: 0 30px 60px -30px rgba(23, 43, 107, .35);
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
svg { display: block; }
::selection { background: #c7dbff; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.up { color: #d92d20; }   /* 国内习惯：涨红 */
.down { color: #07875a; } /* 跌绿 */

/* ---------- 顶栏 ---------- */
.ticker {
  background: #0f1e3d;
  color: #cddaf5;
  font-size: 12px;
  height: 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker .wrap { display: flex; align-items: center; gap: 22px; width: 100%; }
.ticker-label {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; font-weight: 600; letter-spacing: .04em;
  padding-right: 16px; border-right: 1px solid rgba(255,255,255,.16);
  white-space: nowrap;
}
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.22); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.ticker-items { display: flex; gap: 26px; overflow: hidden; flex: 1; }
.tick { display: flex; gap: 7px; align-items: baseline; white-space: nowrap; }
.tick b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.tick .chg { font-size: 11px; }

header.hdr {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; gap: 34px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #2c5ee8, #1740b8);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(29, 78, 216, .75), inset 0 1px 0 rgba(255,255,255,.28);
}
.brand-txt strong { display: block; font-size: 16.5px; letter-spacing: -.01em; line-height: 1.15; }
.brand-txt span { display: block; font-size: 9.5px; letter-spacing: .18em; color: var(--ink-3); font-weight: 600; }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main a {
  padding: 8px 14px; border-radius: 9px; font-size: 14px; color: var(--ink-2); font-weight: 500;
  transition: .16s;
}
nav.main a:hover { background: var(--surface-3); color: var(--ink); }
nav.main a.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.hdr-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-2); background: #fff; transition: .16s;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--brand); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #2c5ee8, #0ea5e9); }
.user-chip .nm { font-size: 13px; font-weight: 600; }
.tag-plan { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--copper-soft); color: var(--copper); letter-spacing: .02em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; border: 1px solid transparent; transition: .18s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, #2a5ce8, #1b44c0); color: #fff; box-shadow: 0 8px 20px -10px rgba(29,78,216,.85); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(29,78,216,.9); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #dbe8ff; }
.btn-copper { background: linear-gradient(135deg, #c97612, #a35a06); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- 首页 hero ---------- */
.hero { padding: 54px 0 40px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0 -200px auto -200px; height: 420px; pointer-events: none;
  background:
    radial-gradient(680px 320px at 12% 0%, rgba(59,130,246,.13), transparent 70%),
    radial-gradient(520px 280px at 88% 10%, rgba(14,165,233,.12), transparent 72%);
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 52px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line-2);
  font-size: 11.5px; font-weight: 600; color: var(--brand); letter-spacing: .02em;
  box-shadow: var(--shadow-1);
}
h1.hero-title {
  font-size: 44px; line-height: 1.18; letter-spacing: -.035em; margin: 18px 0 14px; font-weight: 800;
}
h1.hero-title em { font-style: normal; background: linear-gradient(135deg, #1d4ed8, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 15.5px; color: var(--ink-2); max-width: 520px; margin: 0 0 26px; line-height: 1.75; }
.searchbar {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-2);
  border-radius: 14px; padding: 7px 7px 7px 15px; box-shadow: var(--shadow-2); max-width: 540px;
}
.searchbar svg { flex-shrink: 0; color: var(--ink-3); }
.searchbar input { flex: 1; border: none; outline: none; height: 40px; background: transparent; font-size: 14.5px; min-width: 0; }
.searchbar input::placeholder { color: var(--ink-3); }
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qtag {
  font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.8); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px; transition: .15s;
}
.qtag:hover { border-color: #b9cdf5; color: var(--brand); background: #fff; }
.trust { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 12.5px; color: var(--ink-3); }
.avatars { display: flex; }
.avatars span {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px;
  display: grid; place-items: center; font-size: 10px; color: #fff; font-weight: 700;
}
.avatars span:first-child { margin-left: 0; }

/* hero 右侧图纸卡 */
.hero-visual { position: relative; }
.blueprint {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  box-shadow: var(--shadow-3); transform: rotate(-.6deg);
}
.blueprint-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.blueprint-head .t { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); }
.win-dots { display: flex; gap: 5px; }
.win-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e2e8f0; display: block; }
.blueprint svg { width: 100%; height: auto; border-radius: 10px; background: #fbfcff; }
.float-chip {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 10px;
}
.float-chip .k { font-size: 10.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; }
.float-chip .v { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.fc-1 { left: -26px; bottom: 44px; transform: rotate(-1.2deg); }
.fc-2 { right: -18px; top: 28px; transform: rotate(1deg); }

/* ---------- 通用区块 ---------- */
.sec { padding: 42px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sec-head h2 { font-size: 23px; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 750; }
.sec-head p { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.link-more { color: var(--brand); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* 分类卡 */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  display: flex; flex-direction: column; gap: 12px; transition: .2s; position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #cddcf7; }
.cat-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.cat-card h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.cat-card p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.cat-card .cnt { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.cat-card .arrow { position: absolute; right: 16px; top: 18px; color: var(--line-2); transition: .2s; }
.cat-card:hover .arrow { color: var(--brand); transform: translateX(3px); }

/* 工具条 */
.tool-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tool-pill {
  display: flex; gap: 12px; align-items: center; padding: 15px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); transition: .18s; text-align: left;
}
.tool-pill:hover { border-color: #bcd0f7; box-shadow: var(--shadow-1); transform: translateY(-2px); }
.tool-pill .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.tool-pill b { display: block; font-size: 13.5px; }
.tool-pill span { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 资源卡 ---------- */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.res-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; transition: .2s; cursor: pointer;
}
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #cfdcf5; }
.thumb { position: relative; height: 158px; background: var(--surface-3); overflow: hidden; }
.thumb svg { width: 100%; height: 100%; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge {
  font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 5px; letter-spacing: .03em;
  background: rgba(255,255,255,.94); color: var(--ink-2); border: 1px solid rgba(15,23,42,.06);
}
.badge.free { color: var(--ok); background: var(--ok-soft); border-color: #c7eedd; }
.badge.pro { color: var(--brand); background: var(--brand-soft); border-color: #cfe0ff; }
.badge.ent { color: var(--copper); background: var(--copper-soft); border-color: #f2ddba; }
.thumb-lock {
  position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255,255,255,.94); display: grid; place-items: center; color: var(--copper);
  border: 1px solid rgba(15,23,42,.06);
}
.res-body { padding: 14px 15px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.res-title { font-size: 14.5px; font-weight: 650; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: -.01em; }
.res-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 10.5px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 5px; }
.res-foot { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--ink-3); margin-top: auto; padding-top: 4px; }
.res-foot .star { color: #e08700; font-weight: 600; }

/* ---------- 资源库页 ---------- */
.page-head { padding: 30px 0 6px; }
.crumb { font-size: 12px; color: var(--ink-3); display: flex; gap: 7px; align-items: center; margin-bottom: 12px; }
.crumb b { color: var(--ink-2); font-weight: 500; }
h1.page-title { font-size: 27px; letter-spacing: -.025em; margin: 0 0 6px; font-weight: 780; }
.lib-layout { display: grid; grid-template-columns: 232px 1fr; gap: 26px; padding: 18px 0 50px; align-items: start; }
.filter-panel { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.f-group { padding: 12px 12px 14px; border-bottom: 1px solid var(--line); }
.f-group:last-child { border-bottom: none; }
.f-group h4 { margin: 0 0 9px; font-size: 11px; letter-spacing: .09em; color: var(--ink-3); font-weight: 700; text-transform: uppercase; }
.f-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 7px 9px; border-radius: 8px; font-size: 13px; color: var(--ink-2); text-align: left; transition: .14s;
}
.f-item:hover { background: var(--surface-2); }
.f-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.f-item .n { font-size: 11px; color: var(--ink-3); }
.f-item.on .n { color: var(--brand); }
.lib-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.lib-toolbar .searchbar { max-width: 360px; padding: 4px 4px 4px 12px; box-shadow: none; }
.lib-toolbar .searchbar input { height: 34px; font-size: 13.5px; }
.result-count { font-size: 13px; color: var(--ink-3); }
.result-count b { color: var(--ink); font-weight: 700; }
.empty { padding: 70px 0; text-align: center; color: var(--ink-3); }

/* ---------- 详情页 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 352px; gap: 26px; padding: 8px 0 50px; align-items: start; }
.preview-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.pv-left { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.pv-tools { display: flex; gap: 6px; }
.pv-stage { position: relative; background: #fbfcfe; min-height: 520px; display: grid; place-items: center; padding: 18px; overflow: auto; }
.pv-stage.dark-stage { background: #f4f7fc; }
.pv-stage svg { width: 100%; height: auto; max-height: 640px; }
.watermark {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background-image: repeating-linear-gradient(-32deg, transparent 0 118px, rgba(29,78,216,.055) 118px 119px);
  display: grid; place-items: center;
}
.watermark span {
  font-size: 19px; font-weight: 800; color: rgba(29,78,216,.14); transform: rotate(-24deg);
  letter-spacing: .12em; border: 2px solid rgba(29,78,216,.12); padding: 8px 18px; border-radius: 8px;
}
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.side-card + .side-card { margin-top: 14px; }
.detail-title { font-size: 21px; line-height: 1.4; letter-spacing: -.02em; margin: 8px 0 10px; font-weight: 750; }
.meta-row { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.spec-list { display: flex; flex-direction: column; gap: 0; margin: 14px 0; }
.spec-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.spec-row:last-child { border-bottom: none; }
.spec-row span { color: var(--ink-3); }
.spec-row b { font-weight: 600; }
.ent-card { background: linear-gradient(160deg, #f7faff, #eef4ff); border: 1px solid #d8e5ff; }
.ent-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.ent-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.65; margin-bottom: 14px; }
.detail-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.kv-line { display: flex; gap: 8px; font-size: 12px; color: var(--ink-3); padding: 7px 0; }
.kv-line b { color: var(--ink-2); font-weight: 600; }

/* ---------- 行情 ---------- */
.price-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.price-card .nm { font-size: 11.5px; color: var(--ink-3); font-weight: 600; display: flex; justify-content: space-between; }
.price-card .val { font-size: 20px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 1px; font-variant-numeric: tabular-nums; }
.price-card .val small { font-size: 10.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.price-card .chg { font-size: 11.5px; font-weight: 600; }
.spark { margin-top: 8px; height: 26px; width: 100%; }

/* ---------- 会员 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.plan-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; position: relative;
}
.plan-card.hot { border-color: #b9cffb; box-shadow: 0 20px 44px -26px rgba(29,78,216,.55); }
.hot-tag { position: absolute; top: 16px; right: 16px; font-size: 10.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg,#2a5ce8,#0ea5e9); padding: 3px 9px; border-radius: 999px; }
.plan-name { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.plan-price { font-size: 36px; font-weight: 820; letter-spacing: -.04em; margin: 10px 0 2px; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan-desc { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.plan-feats { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-feats li { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.plan-feats li svg { flex-shrink: 0; margin-top: 3px; color: var(--ok); }
.compare { width: 100%; border-collapse: collapse; margin-top: 26px; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); }
.compare th, .compare td { padding: 12px 16px; font-size: 13px; text-align: left; border-bottom: 1px solid var(--line); }
.compare th { background: var(--surface-2); font-size: 12px; color: var(--ink-3); font-weight: 700; letter-spacing: .04em; }
.compare td:not(:first-child) { text-align: center; }

/* ---------- 工具页 ---------- */
.tools-layout { display: grid; grid-template-columns: 246px 1fr; gap: 24px; padding: 16px 0 50px; align-items: start; }
.tool-nav { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.tool-nav h4 { margin: 10px 10px 8px; font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; }
.tool-link {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px;
  font-size: 13px; color: var(--ink-2); text-align: left; transition: .14s;
}
.tool-link:hover { background: var(--surface-2); }
.tool-link.on { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.tool-link .tn { margin-left: auto; font-size: 10px; color: var(--ink-3); }
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tool-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tool-head h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; font-weight: 750; }
.tool-head p { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.tool-body { display: grid; grid-template-columns: 340px 1fr; gap: 0; }
.tool-form { padding: 20px 22px; border-right: 1px solid var(--line); background: var(--surface-2); }
.tool-out { padding: 20px 22px; }
.field { margin-bottom: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.field label i { font-style: normal; color: var(--ink-3); font-weight: 500; font-size: 11px; }
.input-wrap { display: flex; align-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; transition: .15s; }
.input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.input-wrap input, .input-wrap select { flex: 1; border: none; outline: none; height: 38px; padding: 0 11px; background: transparent; width: 100%; min-width: 0; }
.input-wrap .unit { padding: 0 11px; font-size: 11.5px; color: var(--ink-3); background: var(--surface-2); align-self: stretch; display: grid; place-items: center; border-left: 1px solid var(--line); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238592a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 28px !important; }
.result-hero { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.result-box { flex: 1; min-width: 130px; background: linear-gradient(160deg,#f7faff,#eef4ff); border: 1px solid #dbe6ff; border-radius: 12px; padding: 14px; }
.result-box .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.result-box .v { font-size: 26px; font-weight: 820; letter-spacing: -.035em; color: var(--brand); font-variant-numeric: tabular-nums; margin-top: 2px; }
.result-box .v small { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-left: 3px; letter-spacing: 0; }
.formula { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 11.8px; color: var(--ink-2); line-height: 1.9; overflow-x: auto; }
.formula b { color: var(--brand); font-weight: 600; }
.out-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.out-table th { text-align: left; font-size: 11px; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); letter-spacing: .03em; }
.out-table td { padding: 8px 10px; border-bottom: 1px solid #f0f4fa; font-variant-numeric: tabular-nums; }
.out-table tr.rec td { background: #f2f8ff; font-weight: 650; color: var(--brand); }
.out-table tr.bad td { color: var(--ink-3); }
.pill-ok { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); font-weight: 650; }
.pill-no { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #fef2f2; color: var(--danger); font-weight: 650; }
.out-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; margin-top: 12px; display: flex; gap: 7px; }

/* ---------- 后台 ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat-card .k { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.stat-card .v { font-size: 27px; font-weight: 820; letter-spacing: -.04em; margin-top: 4px; }
.stat-card .v small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 5px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; outline: none; background: #fff;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(11,18,32,.42); backdrop-filter: blur(3px);
  z-index: 200; display: grid; place-items: center; padding: 20px; animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 420px; padding: 26px;
  box-shadow: 0 40px 80px -30px rgba(11,18,32,.5); animation: pop .2s cubic-bezier(.2,.9,.3,1.2);
  position: relative;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal h3 { margin: 0 0 6px; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.modal p.sub { margin: 0 0 18px; font-size: 13px; color: var(--ink-3); }
.modal-close { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.login-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line-2);
  border-radius: 11px; margin-bottom: 10px; font-size: 14px; font-weight: 600; transition: .16s; background: #fff;
}
.login-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.login-opt .li { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.login-opt small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 11px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.phone-row { display: flex; gap: 8px; }
.phone-row input { flex: 1; border: 1px solid var(--line-2); border-radius: 10px; height: 42px; padding: 0 12px; outline: none; }
.qr-box { display: grid; place-items: center; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; margin: 12px 0 6px; background: var(--surface-2); }
.pay-summary { background: var(--surface-2); border-radius: 11px; padding: 14px; margin: 14px 0; }
.pay-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.pay-row.total { border-top: 1px dashed var(--line-2); margin-top: 6px; padding-top: 9px; font-weight: 700; }
.pay-row.total b { color: var(--copper); font-size: 17px; }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 300;
  background: #101a2e; color: #fff; font-size: 13px; padding: 11px 18px; border-radius: 10px;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,.5); animation: toastIn .22s ease; display: flex; gap: 9px; align-items: center;
}
@keyframes toastIn { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- 页脚 ---------- */
footer.ft { border-top: 1px solid var(--line); background: #fff; margin-top: 30px; padding: 38px 0 30px; }
.ft-in { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.ft h5 { font-size: 12px; font-weight: 700; color: var(--ink); margin: 0 0 12px; letter-spacing: .02em; }
.ft a, .ft p { font-size: 12.5px; color: var(--ink-3); display: block; margin: 0 0 8px; }
.ft a:hover { color: var(--brand); }
.ft-bottom { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- 打印 ---------- */
.print-head { display: none; }
@media print {
  .ticker, header.hdr, footer.ft, .tool-nav, .tool-form .btn, .no-print, .hero::before { display: none !important; }
  body { background: #fff; }
  .tools-layout { display: block; }
  .tool-panel { border: none; }
  .tool-body { display: block; }
  .tool-form { display: none; }
  .print-head { display: block; margin-bottom: 18px; border-bottom: 2px solid #0b1220; padding-bottom: 12px; }
  .print-head h1 { margin: 0 0 4px; font-size: 20px; }
  .print-head div { font-size: 11px; color: #555; }
  .result-box { background: #f7f7f7 !important; border-color: #ddd !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; gap: 34px; }
  h1.hero-title { font-size: 34px; }
  .res-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-layout, .tools-layout, .detail-layout { grid-template-columns: 1fr; }
  .filter-panel, .tool-nav { position: static; }
  .tool-body { grid-template-columns: 1fr; }
  .tool-form { border-right: none; border-bottom: 1px solid var(--line); }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .ft-in { grid-template-columns: 1fr 1fr; }
  nav.main { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1.hero-title { font-size: 28px; }
  .res-grid, .cat-grid, .price-grid, .tool-strip { grid-template-columns: 1fr; }
  .fc-1, .fc-2 { display: none; }
  .detail-layout { gap: 16px; }
  .hdr-in { gap: 12px; }
  .brand-txt span { display: none; }
}

/* ---------- 预览：PDF / 表格 / 视频 ---------- */
#pv-stage { transform-origin: center top; }
#pv-body { transform-origin: center top; }

.paper {
  width: 100%; max-width: 620px; margin: 0 auto; background: #fff;
  border: 1px solid #e6ecf6; box-shadow: 0 18px 40px -28px rgba(15,23,42,.4);
  padding: 30px 34px 22px; border-radius: 3px; position: relative;
  font-family: "Songti SC", "SimSun", serif;
}
.paper::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(29,78,216,.05);
}
.paper-head { display: flex; justify-content: space-between; font-size: 10.5px; color: #8592a8; border-bottom: 1px solid #e6ecf6; padding-bottom: 8px; font-family: sans-serif; }
.paper-title { font-size: 16px; font-weight: 700; margin: 22px 0 16px; color: #1a2333; letter-spacing: .02em; }
.paper-line { display: flex; gap: 10px; margin-bottom: 14px; }
.paper-line b { font-size: 11.5px; color: #1d4ed8; font-family: var(--mono); white-space: nowrap; padding-top: 1px; }
.paper-line p { margin: 0; font-size: 12.8px; line-height: 2; color: #2c3a4f; text-align: justify; }
.paper-note { font-size: 11px; color: #8592a8; border-top: 1px dashed #e6ecf6; padding-top: 10px; margin-top: 16px; font-family: sans-serif; }
.paper-foot { display: flex; justify-content: space-between; font-size: 10px; color: #a3aebf; margin-top: 16px; font-family: sans-serif; }

.sheet-wrap { width: 100%; background: #fff; border: 1px solid #e6ecf6; border-radius: 6px; overflow: hidden; }
.sheet-bar { display: flex; justify-content: space-between; padding: 9px 14px; background: #f3f7fd; border-bottom: 1px solid #e6ecf6; font-size: 11.5px; color: #5b7a99; font-family: sans-serif; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sheet-table th { background: #eaf1fb; color: #42566f; font-weight: 700; font-size: 11px; text-align: center; padding: 8px 6px; border: 1px solid #dde7f4; }
.sheet-table td { padding: 7px 8px; border: 1px solid #eaf0f8; text-align: center; color: #3c4a5e; font-variant-numeric: tabular-nums; }
.sheet-table td:first-child { text-align: left; font-family: var(--mono); font-size: 11px; }
.sheet-table tbody tr:nth-child(even) td { background: #fbfdff; }
.sheet-foot { padding: 9px 14px; font-size: 11px; color: #8592a8; border-top: 1px solid #e6ecf6; background: #fcfdff; }

.video-mock { width: 100%; max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid #e6ecf6; border-radius: 10px; overflow: hidden; }
.vm-stage {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #3b1d8f, #6d28d9 55%, #4338ca);
  display: grid; place-items: center;
}
.vm-stage::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.vm-play { position: relative; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; color: #5b21b6; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.vm-badge { position: absolute; right: 12px; bottom: 12px; font-size: 11px; color: #fff; background: rgba(0,0,0,.35); padding: 4px 9px; border-radius: 5px; font-family: sans-serif; }
.vm-bar { height: 4px; background: #eef1f7; }
.vm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6d28d9, #4338ca); }
.vm-chapters { padding: 8px 6px 12px; }
.vm-chapters > div { display: flex; gap: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); border-radius: 7px; }
.vm-chapters > div span { font-family: var(--mono); color: var(--ink-3); font-size: 11px; }
.vm-chapters > div.on { background: #f4efff; color: #5b21b6; font-weight: 600; }
.vm-chapters > div.on span { color: #7c3aed; }

/* ---------- 负荷计算表 ---------- */
.load-head, .load-row { display: grid; grid-template-columns: 1.5fr .85fr .6fr .65fr; gap: 6px; align-items: center; }
.load-head { font-size: 10px; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; padding: 0 2px; letter-spacing: .03em; }
.load-row { margin-bottom: 6px; }
.load-row input {
  width: 100%; border: 1px solid var(--line-2); border-radius: 7px; height: 32px; padding: 0 8px;
  background: #fff; outline: none; font-size: 12px; font-variant-numeric: tabular-nums;
}
.load-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ---------- 演示模式提示条（数据库未接通时的兜底展示） ---------- */
.offline-bar {
  display: flex; align-items: center; gap: 9px;
  max-width: 1224px; margin: 16px auto 0; padding: 10px 16px;
  background: #fff9ec; border: 1px solid #f2e0b6; border-radius: 10px;
  font-size: 12.5px; color: #7d5c12; line-height: 1.5;
}
.offline-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d99000; flex: 0 0 auto; }
.offline-bar b { font-weight: 700; flex: 0 0 auto; }
.offline-bar span { color: #8d7038; }
@media (max-width: 1280px) { .offline-bar { margin: 14px 28px 0; } }
@media (max-width: 640px) { .offline-bar { margin: 12px 16px 0; flex-wrap: wrap; } }
