/* ============================================================
   SOTALINK 思拓万象 — 站点共享样式
   纯静态站点，无构建步骤，由 nginx 直接提供。
   风格：浅色、科技、清新、简洁。全站只有这一份样式，避免出现第二套设计语言。
   ============================================================ */

:root {
  /* 底色与层次 */
  --bg: #f7f9fc;
  --bg-tint: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;

  /* 描边 */
  --line: #e6ecf4;
  --line-2: #d6e0ed;

  /* 文字 */
  --fg: #0f1b2d;
  --fg-2: #4a5a70;
  --fg-3: #7a8ba1;
  --fg-4: #9dabbd;

  /* 品牌 */
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --brand-soft: #eef4ff;
  --brand-line: #c7dbff;

  /* 语义 */
  --ok: #0e9f6e;
  --ok-soft: #e8f8f2;
  --warn: #b45309;
  --warn-soft: #fdf4e7;
  --bad: #dc2626;
  --bad-soft: #fdeeee;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 20px rgba(15, 27, 45, .05);
  --shadow-hover: 0 2px 6px rgba(15, 27, 45, .06), 0 14px 32px rgba(37, 99, 235, .09);
  --wrap: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

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

/* 防御：详情行用 hidden 属性控制显隐，避免任何 display 规则把它盖掉 */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  line-height: 1.65;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 420px at 12% -8%, var(--bg-tint) 0%, rgba(238, 244, 255, 0) 62%),
    radial-gradient(900px 380px at 92% 2%, #eafafd 0%, rgba(234, 250, 253, 0) 58%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #1d4ed8; text-decoration: underline; }

code, .mono { font-family: var(--mono); font-size: .88em; }

/* ---------------- 顶部导航 ---------------- */
nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
/* Logo：SOTALINK 为主标题，思拓万象作小字注脚置于其右下角（flex-end 底部对齐，形成下标感） */
.logo { line-height: 1; }
.logo a {
  display: inline-flex;
  align-items: flex-end;
  gap: .4rem;
  color: var(--fg);
  text-decoration: none;
}
.logo a:hover { color: var(--fg); text-decoration: none; }
.logo .mark {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1;
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.logo .sub {
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: 2.5px;
  line-height: 1;
  color: var(--fg-3);
}
nav ul { list-style: none; display: flex; gap: 1.8rem; flex-wrap: wrap; }
nav a { color: var(--fg-2); font-size: .93rem; }
nav a:hover { color: var(--brand); text-decoration: none; }
nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }
/* 站外链接标记（导航里的反馈表单等） */
nav a.ext::after { content: "↗"; font-size: .8em; margin-left: .18em; opacity: .5; }
/* 开发中的模块：灰色、不可点，避免死链。徽标刻意减重（无描边、小字号、常规字重），
   避免用暖色强调"尚未上线"的东西——它应当后退，而不是抢眼。 */
nav .soon-link { color: var(--fg-4); cursor: default; font-size: .93rem; }
nav .soon-badge {
  display: inline-block;
  margin-left: .4rem;
  vertical-align: 1px;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 3px;
  padding: .06rem .34rem;
}

/* ---------------- 版心 ---------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 2rem; }
main { flex: 1; padding: 2.5rem 0 4rem; }

/* ---------------- 首页 ---------------- */
.hero {
  text-align: center;
  padding: 4.5rem 2rem 3.5rem;
  max-width: 880px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.5px;
  margin-bottom: 1.1rem;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero p { color: var(--fg-2); font-size: 1.06rem; max-width: 640px; margin: 0 auto 2rem; }
.hero p strong { color: var(--fg); font-weight: 600; }

.btn {
  display: inline-block;
  padding: .8rem 2.1rem;
  border-radius: 50px;
  font-size: .97rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-primary {
  background: linear-gradient(92deg, var(--brand), #3b82f6);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .22);
}
.btn-primary:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, .3);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--brand-line); }
.card h3 { font-size: 1.03rem; margin-bottom: .5rem; }
.card p { font-size: .9rem; color: var(--fg-2); }
.card .icon {
  font-size: 1.35rem;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--brand-soft);
  margin-bottom: 1rem;
}

.data-cta, .statement { max-width: 1000px; margin: 0 auto 2rem; padding: 0 2rem; }
.data-cta-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  box-shadow: var(--shadow);
}
.data-cta h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.data-cta p { font-size: .92rem; color: var(--fg-2); max-width: 560px; }
.data-cta p strong { color: var(--fg); font-weight: 600; }
.data-stat { margin-top: .55rem; font-size: .84rem; color: var(--fg-3); }
.data-stat b { color: var(--fg-2); font-weight: 600; }
.data-cta .btn { flex: 0 0 auto; }

.statement-inner {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.6rem 1.9rem;
}
.statement h2 { font-size: 1.08rem; margin-bottom: .7rem; }
.statement p { font-size: .91rem; color: var(--fg-2); }
.statement p + p { margin-top: .6rem; }
.statement strong { color: var(--fg); font-weight: 600; }

/* 开发中的模块（路线图）。虚线边框＝尚未上线，不做成链接以免产生死链 */
.soon { max-width: 1000px; margin: 0 auto 2rem; padding: 0 2rem; }
.soon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  background: var(--surface);
}
.soon-tag {
  flex: 0 0 auto;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid #f2ddb8;
  border-radius: 5px;
  padding: .1rem .45rem;
}
.soon p { font-size: .91rem; color: var(--fg-2); }
.soon strong { color: var(--fg); font-weight: 600; }

/* ---------------- 页头 ---------------- */
.page-head { margin-bottom: 1.5rem; }
.page-head h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.28;
  margin-bottom: .5rem;
}
.lede { color: var(--fg-2); max-width: 760px; font-size: .98rem; }
.lede strong { color: var(--fg); font-weight: 600; }

.stat-line {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.3rem;
  margin-top: .9rem;
  font-size: .86rem;
  color: var(--fg-3);
}
.stat-line b { color: var(--fg-2); font-weight: 600; }

/* 一行式口径提示：短、弱化，不做方法论展示 */
.footnote {
  margin: 1.1rem 0 0;
  font-size: .84rem;
  color: var(--fg-3);
  line-height: 1.7;
}
.footnote strong { color: var(--fg-2); font-weight: 600; }

/* ---------------- 工具条 ---------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1rem;
  align-items: center;
  margin: 1.4rem 0 .9rem;
}
.search {
  flex: 1 1 260px;
  min-width: 200px;
  padding: .58rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--fg);
  font-size: .92rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.search::placeholder { color: var(--fg-4); }
.search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  padding: .32rem .78rem;
  border-radius: 50px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--fg-2);
  font-size: .83rem;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.chip[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(92deg, var(--brand), #3b82f6);
  border-color: transparent;
}

/* 图例：null / 0 / 省略 / 未核验 四种语义必须能分辨 */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  font-size: .81rem;
  color: var(--fg-3);
  padding: .65rem .1rem 0;
  border-top: 1px solid var(--line);
  margin-top: .4rem;
}
.legend b { color: var(--fg-2); font-weight: 600; }

/* ---------------- 厂商分组 ---------------- */
.provider {
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.provider-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .85rem;
  padding: .95rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.provider-head h2 { font-size: 1.02rem; font-weight: 700; }
.provider-head .cur { font-size: .81rem; color: var(--fg-3); }
.provider-head .cnt { font-size: .81rem; color: var(--fg-4); margin-left: auto; }

.table-scroll { overflow-x: auto; }

table.prices { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 760px; }
table.prices th, table.prices td {
  padding: .68rem .8rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.prices thead th {
  font-size: .76rem;
  font-weight: 600;
  color: var(--fg-3);
  letter-spacing: .02em;
  background: var(--surface-2);
}
table.prices th:first-child, table.prices td:first-child { text-align: left; white-space: normal; min-width: 200px; }
table.prices th:last-child, table.prices td:last-child { text-align: right; width: 4.5rem; }
table.prices tbody tr:hover { background: var(--brand-soft); }
table.prices tbody tr:last-child td { border-bottom: none; }

.m-name { font-weight: 600; color: var(--fg); }
.m-id { display: block; font-family: var(--mono); font-size: .75rem; color: var(--fg-4); margin-top: .1rem; }

/* 别名跟在 API ID 之后（同一行，窄屏折行时整体下移）。
   项目模型 ID 取版本级写法，官方现行名常是滚动别名，两者不同。
   不加文字标签，只靠浅底小标签与 ID 本体区分——位置固定即表意。 */
.m-alias {
  margin-left: .45rem;
  padding: .06rem .42rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--fg-3);
  background: var(--surface-3);
}

.badge {
  display: inline-block;
  margin-left: .38rem;
  padding: .04rem .42rem;
  border-radius: 5px;
  font-size: .69rem;
  font-weight: 600;
  vertical-align: 1px;
  border: 1px solid var(--line-2);
  color: var(--fg-3);
  background: var(--surface-2);
}
.badge.tier { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.badge.time { border-color: #f2ddb8; color: var(--warn); background: var(--warn-soft); }

.price { font-family: var(--mono); color: var(--fg); }
.price.free {
  color: var(--ok);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  background: var(--ok-soft);
  border-radius: 5px;
  padding: .06rem .4rem;
}
.na { color: var(--fg-4); font-size: .84rem; }
.unknown {
  color: var(--fg-3);
  font-size: .78rem;
  background: var(--surface-3);
  border-radius: 5px;
  padding: .06rem .4rem;
}
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--bad); font-weight: 700; }

.tok { font-family: var(--mono); color: var(--fg-2); }

.detail-row td {
  background: var(--surface-2);
  text-align: left !important;
  white-space: normal !important;
  padding: 1rem 1.2rem !important;
  font-size: .85rem;
  color: var(--fg-2);
}
.detail-row dl { display: grid; grid-template-columns: 6.5rem 1fr; gap: .3rem .9rem; margin-bottom: .6rem; }
.detail-row dt { color: var(--fg-4); }
.detail-row dd { color: var(--fg-2); word-break: break-word; }
.detail-row table.tiers { border-collapse: collapse; margin: .3rem 0 .8rem; font-size: .82rem; }
.detail-row table.tiers th, .detail-row table.tiers td {
  border: 1px solid var(--line);
  padding: .3rem .6rem;
  text-align: right;
  white-space: nowrap;
  background: var(--surface);
}
.detail-row table.tiers th { color: var(--fg-3); font-weight: 600; background: var(--surface-2); }
.detail-row table.tiers td:first-child, .detail-row table.tiers th:first-child { text-align: left; }
.detail-row .note { line-height: 1.8; }
.detail-row .note strong { color: var(--fg); font-weight: 600; }
.detail-row .note code { color: var(--brand); background: var(--brand-soft); padding: .02rem .3rem; border-radius: 4px; }

/* ---------------- 通用块 ---------------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
  margin: 1.2rem 0;
}
.panel h2 { font-size: 1.02rem; margin-bottom: .6rem; }
.panel h3 { font-size: .94rem; margin: 1rem 0 .4rem; }
.panel p, .panel li { color: var(--fg-2); font-size: .91rem; }
.panel ul, .panel ol { margin: .4rem 0 .4rem 1.2rem; }
.panel li { margin: .25rem 0; }
.panel strong { color: var(--fg); font-weight: 600; }

.state-msg { padding: 2.2rem 1.2rem; text-align: center; color: var(--fg-3); font-size: .92rem; }

/* ---------------- 页脚 ---------------- */
footer {
  text-align: center;
  padding: 1.6rem 2rem;
  font-size: .81rem;
  color: var(--fg-3);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
}
footer a { color: var(--fg-3); }
footer a:hover { color: var(--brand); }
footer p + p { margin-top: .35rem; }

/* 公安联网备案图标（官方下载，36×40 RGBA）。规范要求「图标在前，编号在右」，
   故它写在备案链接内、编号文字之前。
   高度 1.3em：主流站（Gitee 21×18、掘金 police.png）图标都比正文略大一档，
   等高于文字会显得发虚；宽度按原图比例。vertical-align 用负值手工对基线——
   CJK 字面的视觉中心比 Latin 的 x-height 中线更高，用 middle 会显得偏下。
   alt 留空：含义由紧随其后的编号文字承担，读屏不必再念一次「图片」。 */
.beian-icon {
  height: 1.3em;
  width: auto;
  margin-right: .3rem;
  vertical-align: -.27em;
}

@media (max-width: 720px) {
  nav { padding: .85rem 1.2rem; }
  nav ul { gap: 1.1rem; }
  .logo .mark { font-size: 1.4rem; }
  .logo .sub { font-size: .64rem; letter-spacing: 2px; }
  .wrap { padding: 0 1.1rem; }
  .hero { padding: 3rem 1.2rem 2.5rem; }
  .features, .data-cta, .statement, .soon { padding: 0 1.1rem; }
  .provider-head .cnt { margin-left: 0; }
}
