/* ============================================================
   IP必备检测 — 共享设计系统
   版式参考 info.bbbb.work：左侧固定导航 + 大标题 Hero + 分栏内容
   视觉基调：纸灰背景 / 墨黑文字 / 橙色强调 / 等宽小标签
   ============================================================ */

/* 阿里妈妈数黑体 —— 本地字体（版权见 fonts/AlimamaShuHeiTi-LICENSE.txt）
   仅用于站名与各级标题，正文保持 Noto Sans */
@font-face {
  font-family: 'Alimama ShuHeiTi';
  src:
    url('../fonts/AlimamaShuHeiTi-Bold.woff2') format('woff2'),
    url('../fonts/AlimamaShuHeiTi-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* JetBrains Mono —— 本地字体（版权见 fonts/JetBrainsMono-OFL.txt）
   可变字重 100–800，latin 子集，用于 IP、数字与等宽技术信息 */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- 设计变量 ---------- */
:root {
  /* 基础色 */
  --paper: #f2f2f2;
  --paper-2: #ececec;
  --paper-3: #e2e2e2;
  --surface: #ffffff;

  --ink: #16181c;
  --ink-2: #3f444c;
  --muted: #737880;
  --muted-2: #9aa0a7;

  --line: #dcdcdc;
  --line-strong: #c4c4c4;

  /* 品牌色 */
  --accent: #ff5a1f;
  --accent-ink: #c8400e;
  --accent-soft: #ffece3;
  --lime: #d9f56d;

  /* 旧样式兼容（页面内联 style 仍在使用） */
  --text-secondary: #737880;

  /* 纯净度色阶（6 段） */
  --p-ultra-clean: #166534;
  --p-clean: #22c55e;
  --p-neutral: #84cc16;
  --p-light: #eab308;
  --p-mid: #f97316;
  --p-high: #dc2626;

  /* 语义色 */
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0ea5e9;

  /* 字号 */
  --fs-xs: 12px;
  --fs-sm: 12.5px;
  --fs-base: 13.5px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 24px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(20, 22, 26, 0.04);
  --shadow-md: 0 14px 34px rgba(20, 22, 26, 0.07);
  --shadow-lg: 0 30px 80px rgba(20, 22, 26, 0.18);

  /* 字体 */
  --font-sans: 'Noto Sans SC', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Alimama ShuHeiTi', 'Noto Sans SC', 'Noto Sans', -apple-system,
    BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Consolas,
    'PingFang SC', 'Microsoft YaHei', monospace;
  --font-num: 'JetBrains Mono', 'Bahnschrift', 'DIN Alternate', 'SF Mono', 'Roboto Mono', Consolas,
    sans-serif;

  --header-h: 64px;
  --side-w: 216px;
  --max: 1240px;

  color-scheme: light;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.3;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color 0.16s ease;
}

a:hover {
  color: var(--accent);
}

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono,
code,
.info-value,
.ip-text,
.metric-value {
  font-family: var(--font-num);
}

.is-hidden {
  display: none !important;
}

/* 演示数据标记 */
.demo-tag {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  margin-left: 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  vertical-align: middle;
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ---------- 背景层（点阵纹理 · 鼠标交互） ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--paper);
  /* 静态点阵底图：直径 1px、间距 22px，与 Canvas 动态点坐标对齐 */
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
}

.bg-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- 外壳 ---------- */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 通用内容宽度 */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(242, 242, 242, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.header-inner {
  width: 100%;
  height: 100%;
  padding: 0 24px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-left {
  width: var(--side-w);
  flex: none;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-logo {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  flex: none;
}

.brand-copy {
  display: flex;
  align-items: center;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.header-action .lucide {
  width: 14px;
  height: 14px;
}

.header-action:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

/* ---------- 主体两栏 ---------- */
.app-body {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  align-items: start;
}

.side-nav {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}

.side-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-label {
  padding: 0 10px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  text-align: left;
  color: var(--ink-2);
  transition: background 0.12s ease, color 0.12s ease;
}

.side-link:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.side-link.is-active {
  background: var(--ink);
  color: var(--paper);
}

.side-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.side-link.is-active .side-count {
  color: var(--lime);
}

.side-foot {
  margin-top: auto;
  margin-left: -12px;
  margin-right: -12px;
  min-height: 60px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.side-foot .side-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.app-content {
  min-width: 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.app-content > main {
  flex: 1;
  min-width: 0;
  /* 内容与页脚之间统一留白 */
  padding-bottom: 40px;
}

/* ---------- 通用小标签 ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.45);
  animation: pulse 2.4s infinite;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 52px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  position: relative;
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
}

.hero-copy {
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero h1 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 700;
}

.hl {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.02em;
  height: 0.28em;
  background: var(--accent);
  opacity: 0.84;
  z-index: -1;
  transform: skewX(-8deg);
}

.hero-desc {
  margin-top: 24px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-actions .btn {
  height: 42px;
  padding: 0 22px;
  font-size: 13px;
}

.hero-stats {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.stat {
  min-width: 104px;
  padding: 0 22px;
  border-left: 1px solid var(--line-strong);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-value {
  display: block;
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat-label {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 区块（替代原居中版式） ---------- */
.catalog {
  padding: 36px 0 30px;
}

.catalog + .catalog {
  padding-top: 8px;
}

/* 页面最后一个区块不再自带底部内边距，由 main 统一控制与页脚的间距 */
.catalog:last-child {
  padding-bottom: 0;
}

.catalog-inner {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.catalog-head .eyebrow {
  margin-bottom: 10px;
}

.catalog-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.head-note {
  max-width: 380px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  text-align: right;
}

/* ---------- 搜索区 ---------- */
.search-section {
  margin-top: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.1);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
}

.search-box input::placeholder {
  color: var(--muted-2);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease,
    box-shadow 0.16s ease, transform 0.12s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-sm {
  height: 32px;
  padding: 0 13px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

.btn .lucide {
  width: 15px;
  height: 15px;
}

/* ---------- 结果卡片 ---------- */
.result-card {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: rise 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.result-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.result-card-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.tab-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab-switch button {
  height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink-2);
  transition: background 0.16s ease, color 0.16s ease;
}

.tab-switch button:hover {
  color: var(--ink);
}

.tab-switch button.active {
  background: var(--ink);
  color: var(--paper);
}

.result-card-body {
  padding: 22px;
}

/* 加载态 */
.loading-wrap {
  padding: 52px 0;
  text-align: center;
}

.pulse-dots {
  display: inline-flex;
  gap: 8px;
}

.pulse-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: dots 1.2s infinite ease-in-out;
}

.pulse-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.pulse-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.loading-text {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

/* IP 信息键值区 */
.ip-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 36px;
}

.ip-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.ip-info-row:last-child {
  border-bottom: none;
}

.ip-info-row.full {
  grid-column: 1 / -1;
}

.info-key {
  color: var(--muted);
  font-size: 12.5px;
  flex-shrink: 0;
}

.info-value {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  font-size: 12.5px;
}

/* 徽章：IP来源 / IP属性 / 纯净度等级 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-green {
  background: #e7f6ea;
  border-color: #bfe6c6;
  color: #166534;
}

.badge-blue {
  background: #e8f0fe;
  border-color: #c6dbfa;
  color: #1d4ed8;
}

.badge-red {
  background: #fdeaea;
  border-color: #f6c9c9;
  color: #991b1b;
}

.badge-amber {
  background: #fdf3e0;
  border-color: #f3ddb0;
  color: #92400e;
}

.badge-gray {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--ink-2);
}

/* ---------- 纯净度系数仪表盘 ---------- */
.trust-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.trust-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.trust-section-title h3 {
  font-size: 14px;
  font-weight: 800;
}

.trust-meter {
  position: relative;
  padding: 34px 0 6px;
}

.trust-badge {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: #166534;
  color: #fff;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  border-radius: 5px;
  white-space: nowrap;
  transition: left 0.6s ease;
  z-index: 3;
}

.trust-badge::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: inherit;
  border-bottom: none;
}

.trust-bar {
  position: relative;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(
    to right,
    var(--p-ultra-clean) 0%,
    var(--p-clean) 15%,
    var(--p-neutral) 25%,
    var(--p-light) 40%,
    var(--p-mid) 50%,
    var(--p-mid) 70%,
    var(--p-high) 100%
  );
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.15);
}

.trust-pointer {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  margin-left: -1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: left 0.6s ease;
  z-index: 2;
}

.trust-ticks {
  position: relative;
  height: 20px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-family: var(--font-mono);
}

.trust-ticks span {
  position: absolute;
  transform: translateX(-50%);
}

.trust-levels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.trust-breakdown {
  margin-top: 20px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}

.breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-val {
  font-family: var(--font-num);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.breakdown-val.ok {
  color: var(--success);
}

.breakdown-val.warn {
  color: var(--muted);
}

.breakdown-val.bad {
  color: var(--danger);
}

/* 多数据源对比 */
.multisource {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.multisource h3,
.map-wrap h3 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.source-table th {
  text-align: left;
  padding: 9px 12px;
  background: var(--paper);
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.source-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.source-table tr:last-child td {
  border-bottom: none;
}

.source-table td.mono {
  font-weight: 500;
}

.source-table .na {
  color: var(--muted-2);
}

/* 地图 */
.map-wrap {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

#map {
  position: relative;
  height: 400px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  z-index: 1;
}

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.map-fallback strong {
  font-size: 13px;
  color: var(--ink);
}

.map-coord {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 功能服务 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 18px 18px;
  color: var(--ink-2);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.16s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  color: var(--ink-2);
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: var(--paper-2);
  color: var(--ink);
  transition: background 0.16s ease, color 0.16s ease;
}

.feature-icon .lucide {
  width: 17px;
  height: 17px;
}

.feature-card:hover .feature-icon {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.feature-card h3 {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.feature-card.is-dev {
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- 合作伙伴 ---------- */
.partners {
  padding: 8px 0 10px;
}

.partner-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.partner-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.partner-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.partner-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

/* ---------- 子页面页头 ---------- */
.page-head {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--line);
}

.page-head .crumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 16px;
}

.page-head .crumb a {
  color: var(--muted);
}

.page-head .crumb a:hover {
  color: var(--accent-ink);
}

.page-head h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.05em;
  line-height: 1.04;
  font-weight: 700;
}

.page-head p.sub {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- 面板 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}

.panel h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.tool-intro {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.tool-intro strong {
  color: var(--ink);
}

.tool-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- IP 地址查询 ---------- */
.lookup-myip {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lookup-myip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lookup-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lookup-myip-value {
  font-family: var(--font-num);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  word-break: break-all;
}

.lookup-myip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lookup-hint {
  font-size: 12.5px;
  color: var(--muted);
}

.lookup-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lookup-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.lookup-input {
  flex: 1 1 260px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease;
}

.lookup-input::placeholder {
  color: var(--muted-2);
}

.lookup-input:focus {
  border-color: var(--ink);
}

.lookup-error {
  margin-top: 10px;
  font-size: 12px;
  color: var(--danger);
}

.lookup-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

#lookup-result {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.lookup-result-head .eyebrow {
  margin-bottom: 10px;
}

.lookup-result-ip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lookup-ip {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
}

.lookup-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.lookup-source {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ---------- 结果状态（成功 / 风险） ---------- */
.result-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.result-tag.ok {
  background: #e7f6ea;
  color: #166534;
}

.result-tag.warn {
  background: #fdf3e0;
  color: #92400e;
}

.result-tag.bad {
  background: #fdeaea;
  color: #991b1b;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.faq-item:hover {
  border-color: var(--line-strong);
}

.faq-item.open {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 15px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.16s ease;
}

.faq-q:hover {
  background: var(--paper);
}

.faq-q .chev {
  transition: transform 0.2s;
  color: var(--muted-2);
  flex-shrink: 0;
  font-size: 11px;
}

.faq-item.open .faq-q .chev {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 16px;
}

/* ---------- 表格（日志/纠正记录） ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  background: var(--paper);
  color: var(--muted);
  font-weight: 600;
}

.data-table td {
  color: var(--ink-2);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(242, 242, 242, 0.6);
}

/* 时间线 */
.timeline {
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 22px 26px;
  border-left: 2px solid var(--line);
  margin-left: 6px;
}

.timeline li:last-child {
  padding-bottom: 4px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline .t-date {
  font-size: 11.5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.timeline .t-title {
  font-weight: 700;
  color: var(--ink);
  margin-top: 3px;
  font-size: 13.5px;
}

.timeline .t-desc {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 5px;
  line-height: 1.8;
}

/* ---------- 代码块（数据接口） ---------- */
.code-block {
  background: #16181c;
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.75;
  font-family: var(--font-mono);
  white-space: pre;
}

.code-block .cm {
  color: #7c828b;
}

.code-block .c-key {
  color: #ffb08f;
}

.code-block .c-str {
  color: #b6e37a;
}

.code-block .c-num {
  color: #f5c451;
}

/* ---------- 工具页：结果状态横幅 ---------- */
.status-hero {
  text-align: center;
  padding: 30px 22px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.status-hero.ok {
  background: #f2faf3;
  border: 1px solid #cbe8d1;
}

.status-hero.warn {
  background: #fdf8ec;
  border: 1px solid #f0e0b4;
}

.status-hero.bad {
  background: #fdf3f3;
  border: 1px solid #f3cccc;
}

.status-hero.na {
  background: var(--paper);
  border: 1px solid var(--line);
}

.status-hero .status-title {
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 800;
  margin-top: 10px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.status-hero.ok .status-title {
  color: #166534;
}

.status-hero.warn .status-title {
  color: #92400e;
}

.status-hero.bad .status-title {
  color: #991b1b;
}

.status-hero.na .status-title {
  color: var(--ink);
}

.status-hero .status-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 6px;
}

/* ---------- Lucide 图标 ---------- */
.lucide {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.status-hero .lucide {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  display: block;
}

.status-hero.ok .lucide {
  color: #16a34a;
}

.status-hero.warn .lucide {
  color: #d97706;
}

.status-hero.bad .lucide {
  color: #dc2626;
}

.status-hero.na .lucide {
  color: var(--muted);
}

/* ---------- 工具页：路由链路可视化 ---------- */
.route-viz {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 18px 0 8px;
}

.route-node {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 150px;
  text-align: center;
}

.route-node .n-role {
  font-size: 11px;
  color: var(--muted);
}

.route-node .n-value {
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  word-break: break-all;
}

.route-node .n-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.route-node.highlight {
  border-color: var(--ink);
  background: var(--paper);
}

.route-node.highlight .n-value {
  color: var(--accent-ink);
}

.route-line {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted-2);
  font-size: 16px;
}

/* ---------- 工具页：指标卡 ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--paper);
}

.metric-card .m-label {
  font-size: 11.5px;
  color: var(--muted);
}

.metric-card .m-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 6px;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.metric-card .m-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 4px;
}

/* ---------- 工具页：结论列表 ---------- */
.conclusion-list {
  margin-top: 16px;
}

.conclusion-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.conclusion-list li:last-child {
  border-bottom: none;
}

.conclusion-list .c-key {
  color: var(--muted);
}

.conclusion-list .c-val {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

/* ---------- 工具页：服务可用性矩阵 ---------- */
.service-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.service-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  background: var(--surface);
}

.service-cell .s-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 12.5px;
}

.service-cell .s-status {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.service-cell .s-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-2);
}

/* ---------- 页脚上方的标准说明 ---------- */
.site-notice {
  background: transparent;
  border-top: 1px solid var(--line);
}

.site-notice-inner {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 26px 0 28px;
}

.site-notice-head .eyebrow {
  margin-bottom: 10px;
}

.site-notice-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-notice-head h2 svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--accent-ink);
}

.site-notice-body {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.site-notice-body p + p {
  margin-top: 8px;
}

.site-notice-body strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.footer-bar {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.footer-credit {
  color: var(--accent-ink);
}

.footer-credit:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-2);
  transition: color 0.16s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  box-shadow: var(--shadow-md);
  animation: rise 0.25s ease;
}

/* ---------- 动画 ---------- */
@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 90, 31, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0);
  }
}

@keyframes dots {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .hero h1 {
    font-size: clamp(36px, 5vw, 58px);
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 980px) {
  .app-body {
    display: block;
  }

  .side-nav {
    position: sticky;
    top: var(--header-h);
    z-index: 50;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(242, 242, 242, 0.94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-group {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: none;
  }

  .side-label,
  .side-foot {
    display: none;
  }

  .side-link {
    width: auto;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    white-space: nowrap;
    flex: none;
  }

  .side-count {
    margin-left: 2px;
  }

  .hero {
    padding: 44px 0 40px;
  }

  .hero-stats {
    margin-top: 28px;
  }

  .catalog {
    padding-top: 28px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 58px;
    --side-w: auto;
  }

  .header-inner {
    padding: 0 16px;
  }

  .header-left {
    width: auto;
  }

  .header-action span {
    display: none;
  }

  .header-action {
    padding: 0 8px;
    border-color: var(--line);
    background: var(--surface);
  }

  .hero-inner,
  .catalog-inner,
  .site-notice-inner,
  .footer-bar {
    width: calc(100% - 32px);
  }

  .site-notice-inner {
    padding: 20px 0 22px;
  }

  .container {
    padding: 0 16px;
  }

  .app-content > main {
    padding-bottom: 32px;
  }

  .hero h1 {
    font-size: clamp(30px, 8.4vw, 44px);
  }

  .hero-desc {
    margin-top: 18px;
    font-size: 13.5px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }

  .hero-stats .stat {
    min-width: 0;
    padding: 0 12px;
  }

  .hero-stats .stat:first-child {
    padding-left: 0;
  }

  .hero-stats .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .stat-value {
    font-size: 22px;
  }

  .catalog-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .head-note {
    text-align: left;
    max-width: none;
  }

  .page-head {
    padding-top: 40px;
  }

  .page-head h1 {
    font-size: clamp(28px, 7.4vw, 40px);
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 8px;
  }

  .search-box input {
    width: 100%;
    padding: 0 8px;
  }

  .search-box .btn {
    width: 100%;
  }

  .result-card-head {
    padding: 14px 16px;
  }

  .result-card-body {
    padding: 16px;
  }

  .ip-info-grid {
    grid-template-columns: 1fr;
  }

  .trust-levels {
    display: none;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .service-matrix {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 0;
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .ip-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .info-value {
    text-align: left;
  }

  .partner-chip {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .pulse-dot,
  .pulse-dots span,
  .result-card {
    animation: none;
  }

  .feature-card,
  .btn,
  .side-link {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   必备编码 — 解码工作台与结果
   ============================================================ */

:root {
  --seg-1: #25496b;
  --seg-2: #3d7a8c;
  --seg-3: #5e8c7e;
  --seg-4: #93acae;
  --seg-5: #b23a2c;
}

.workbench {
  padding: 24px;
}

.wb-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.wb-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.code-input {
  flex: 1 1 420px;
  min-width: 0;
  height: 56px;
  padding: 0 4px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-num);
  font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  outline: none;
}

.code-input::placeholder {
  color: var(--muted-2);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.code-input:focus {
  border-bottom-color: var(--accent);
}

.wb-row .btn {
  height: 56px;
  padding: 0 26px;
}

.wb-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.examples {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

.code-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-num);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.code-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper);
}

.wb-status {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 12px;
  color: var(--muted);
}

.wb-status[data-state="ok"] {
  color: var(--success);
}

.wb-status[data-state="warn"] {
  color: var(--warning);
}

.wb-status[data-state="bad"] {
  color: var(--danger);
}

.decode-result {
  margin-top: 20px;
}

.decode-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.decode-head .eyebrow {
  margin-bottom: 8px;
}

.decode-head h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.decode-standard {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted-2);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.verdict.is-ok {
  border-left-color: var(--success);
  background: #f4faf5;
}

.verdict.is-warn {
  border-left-color: var(--warning);
  background: #fdf8ec;
}

.verdict.is-bad {
  border-left-color: var(--danger);
  background: #fdf3f3;
}

.verdict-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.verdict-main strong {
  font-size: 15px;
  color: var(--ink);
}

.verdict-main span {
  font-size: 12.5px;
  color: var(--muted);
}

.verdict-tag {
  font-family: var(--font-num);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.band-scroll {
  overflow-x: auto;
  margin-top: 18px;
  padding-bottom: 4px;
}

.band {
  display: flex;
  gap: 2px;
  min-width: 100%;
}

.cell {
  flex: 1 1 0;
  min-width: 20px;
  height: 56px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: var(--paper-2);
  color: var(--ink-2);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.cell-ch {
  font-family: var(--font-num);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  line-height: 1;
}

.cell-idx {
  font-family: var(--font-num);
  font-size: 9px;
  line-height: 1;
  opacity: 0.6;
}

.cell.g1 {
  background: var(--seg-1);
  color: #fff;
}

.cell.g2 {
  background: var(--seg-2);
  color: #fff;
}

.cell.g3 {
  background: var(--seg-3);
  color: #fff;
}

.cell.g4 {
  background: var(--seg-4);
  color: var(--ink);
}

.cell.g5 {
  background: var(--seg-5);
  color: #fff;
}

.band.is-hovering .cell:not(.is-active) {
  opacity: 0.38;
}

.cell.is-active {
  transform: translateY(-3px);
}

.band-foot {
  display: flex;
  gap: 2px;
  margin-top: 8px;
}

.foot-seg {
  flex: var(--n) 1 0;
  min-width: 0;
  border-top: 2px solid var(--line);
  padding-top: 6px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.foot-seg b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 11.5px;
}

.foot-seg.g1 {
  border-top-color: var(--seg-1);
}

.foot-seg.g2 {
  border-top-color: var(--seg-2);
}

.foot-seg.g3 {
  border-top-color: var(--seg-3);
}

.foot-seg.g4 {
  border-top-color: var(--seg-4);
}

.foot-seg.g5 {
  border-top-color: var(--seg-5);
}

.band-caption {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.fact {
  flex: 1 1 170px;
  min-width: 0;
  padding: 12px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact.is-wide {
  flex-basis: 100%;
}

.fact dt {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 3px;
}

.fact dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.fact dd.is-ok {
  color: var(--success);
}

.fact dd.is-warn {
  color: var(--warning);
}

.fact dd.is-bad {
  color: var(--danger);
}

.decode-notes {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
}

.decode-notes li + li {
  margin-top: 4px;
}

.ref-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.ref-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface);
}

.ref-item a {
  font-weight: 600;
  font-size: 13px;
}

.ref-item p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.api-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
  font-family: var(--font-num);
  font-size: 12.5px;
}

.api-method {
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
}

.api-path {
  color: var(--ink);
  word-break: break-all;
}

.rules-intro {
  margin: -4px 0 14px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.rules-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.catalog-group {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.catalog-group:first-of-type {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .code-input {
    flex-basis: 100%;
    height: 48px;
  }

  .wb-row .btn {
    width: 100%;
    height: 44px;
  }

  .wb-status {
    margin-left: 0;
    width: 100%;
  }

  .fact {
    flex-basis: 50%;
  }
}
