/* ═════════════════════════════════════════
   SNSUC 数据产品中心 — data.css
   Pages: data-products.html / api-docs.html / alerts.html
   Cohesive with style.css design tokens (ink palette / paper / gold)
   ═════════════════════════════════════════ */

/* ── Compact page hero (shorter than the index hero) ── */
.dp-hero {
  min-height: 56vh;
  padding: 130px 2rem 50px;
}
.dp-hero .hero-headline { font-size: clamp(2.2rem, 5vw, 3.6rem); }

/* ── Section spacing tune for dense data pages ── */
.dp-section { padding: var(--space-section-compact) 0; }

/* ── Filter bar ── */
.dp-toolbar {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center;
  margin-bottom: 1.6rem;
}
.dp-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.dp-chip {
  font-family: 'Inter', 'Noto Serif SC', sans-serif;
  font-size: .8rem; padding: .38rem 1rem; border-radius: 999px;
  border: 1px solid var(--border-ink); background: rgba(255,255,255,.75);
  color: var(--text-muted); cursor: pointer;
  transition: all .25s ease;
}
.dp-chip:hover { color: var(--ink-main); border-color: rgba(0,144,64,.3); }
.dp-chip.active {
  background: var(--ink-main); border-color: var(--ink-main); color: #fff;
}
.dp-search {
  flex: 1 1 220px; max-width: 320px; margin-left: auto;
  position: relative;
}
.dp-search input {
  width: 100%; padding: .5rem 1rem .5rem 2.2rem;
  border: 1px solid var(--border-ink); border-radius: 999px;
  background: rgba(255,255,255,.85); font-family: inherit;
  font-size: .85rem; color: var(--text-body); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.dp-search input:focus {
  border-color: var(--ink-mint);
  box-shadow: 0 0 0 3px rgba(69,184,112,.12);
}
.dp-search svg {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-muted); pointer-events: none;
}

/* ── Commodity price grid (40+) ── */
.dp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .9rem;
}
.dp-card {
  background: rgba(255,255,255,.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-md);
  padding: .95rem 1.05rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative; overflow: hidden;
}
.dp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(0,144,64,.25);
}
.dp-card .h {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .5rem; margin-bottom: .35rem;
}
.dp-card .nm { font-weight: 600; font-size: .88rem; color: var(--text-deep); }
.dp-card .en {
  font-family: 'Inter', sans-serif; font-size: .62rem; color: var(--text-muted);
  letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-card .px {
  font-family: var(--font-ui); font-weight: 600;
  font-size: 1.12rem; color: var(--ink-deep); margin-bottom: .15rem;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -.01em;
}
.dp-card .row {
  display: flex; justify-content: space-between; align-items: center;
}
.dp-card .chg {
  font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.dp-card .chg.up { color: #dc2626; }     /* CN convention: red = up */
.dp-card .chg.down { color: #16a34a; }
.dp-card .chg.flat { color: var(--text-muted); }
.dp-card .unit { font-size: .66rem; color: var(--text-muted); }
.dp-badge {
  display: inline-block; font-family: 'Inter', sans-serif;
  font-size: .58rem; font-weight: 600; letter-spacing: .05em;
  padding: .08rem .45rem; border-radius: 4px; vertical-align: middle;
}
.dp-badge.demo { background: rgba(201,160,60,.12); color: var(--gold); }
.dp-badge.live { background: rgba(0,144,64,.1); color: var(--ink-main); }
.dp-empty {
  grid-column: 1 / -1; text-align: center; padding: 3rem 0;
  color: var(--text-muted); font-size: .9rem;
}
.dp-count { font-size: .78rem; color: var(--text-muted); }

/* ── Panels (charts / tables) ── */
.dp-panel {
  background: rgba(255,255,255,.85);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-soft);
}
.dp-panel + .dp-panel { margin-top: 1.6rem; }
.dp-panel-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem;
  margin-bottom: 1.1rem;
}
.dp-panel-title {
  font-family: var(--font-display), serif;
  font-size: 1.35rem; color: var(--ink-deep); margin-right: auto;
}
.dp-select {
  font-family: 'Inter', 'Noto Serif SC', sans-serif; font-size: .84rem;
  padding: .42rem 2rem .42rem .9rem;
  border: 1px solid var(--border-ink); border-radius: 8px;
  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23009040' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .7rem center;
  color: var(--text-body); appearance: none; -webkit-appearance: none;
  outline: none; cursor: pointer;
}
.dp-select:focus { border-color: var(--ink-mint); }
.dp-chart-wrap { position: relative; width: 100%; height: 380px; }
.dp-chart-wrap.short { height: 300px; }
.dp-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.dp-note {
  font-size: .72rem; color: var(--text-muted); margin-top: .8rem;
  display: flex; align-items: center; gap: .4rem;
}
.dp-note::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); flex: none;
}

/* ── Spread table ── */
.dp-table-wrap { overflow-x: auto; }
.dp-table {
  width: 100%; border-collapse: collapse; min-width: 640px;
  font-size: .86rem;
}
.dp-table th {
  font-family: 'Inter', 'Noto Serif SC', sans-serif; font-weight: 600;
  font-size: .74rem; letter-spacing: .04em; color: var(--text-muted);
  text-align: right; padding: .6rem .8rem;
  border-bottom: 2px solid var(--border-ink);
  white-space: nowrap;
}
.dp-table th:first-child, .dp-table td:first-child { text-align: left; }
.dp-table td {
  padding: .68rem .8rem; text-align: right;
  border-bottom: 1px solid var(--border-ink);
  font-family: 'Inter', 'Noto Serif SC', sans-serif;
  color: var(--text-body); white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.dp-table tr:last-child td { border-bottom: none; }
.dp-table tr:hover td { background: rgba(0,144,64,.03); }
.dp-table .pair { font-weight: 600; color: var(--text-deep); }
.dp-table .basis-pos { color: #dc2626; font-weight: 600; }
.dp-table .basis-neg { color: #16a34a; font-weight: 600; }
.dp-table .note-cell {
  max-width: 280px; white-space: normal; font-size: .74rem;
  color: var(--text-muted); text-align: left;
}

/* ── Inventory fallback bars (no-JS-lib degradation) ── */
.dp-bars { display: flex; flex-direction: column; gap: .7rem; }
.dp-bar-row { display: grid; grid-template-columns: 120px 1fr 90px; gap: .8rem; align-items: center; }
.dp-bar-label { font-size: .8rem; color: var(--text-deep); }
.dp-bar-track { height: 14px; background: var(--ink-frost); border-radius: 7px; overflow: hidden; }
.dp-bar-fill {
  height: 100%; border-radius: 7px;
  background: linear-gradient(90deg, var(--ink-main), var(--ink-mint));
}
.dp-bar-val {
  font-family: var(--font-ui); font-size: .76rem; color: var(--text-muted); text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* ── CTA cards ── */
.dp-cta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.dp-cta {
  display: flex; flex-direction: column; gap: .5rem;
  background: linear-gradient(160deg, rgba(255,255,255,.9), var(--ink-mist));
  border: 1px solid var(--border-ink); border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem; text-decoration: none !important;
  color: inherit; position: relative; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.dp-cta:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.dp-cta::after {
  content: '→'; position: absolute; right: 1.4rem; bottom: 1.1rem;
  color: var(--ink-mint); font-size: 1.2rem; transition: transform .3s ease;
}
.dp-cta:hover::after { transform: translateX(4px); }
.dp-cta .t {
  font-family: var(--font-display), serif; font-size: 1.3rem;
  color: var(--ink-deep);
}
.dp-cta .d { font-size: .82rem; color: var(--text-muted); line-height: 1.7; }
.dp-cta .tag {
  align-self: flex-start; font-family: 'Inter', sans-serif;
  font-size: .62rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-main);
  background: rgba(0,144,64,.08); padding: .18rem .6rem; border-radius: 4px;
}

/* ═════════ API DOCS ═════════ */
.api-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 2.4rem;
  align-items: start;
}
.api-toc {
  position: sticky; top: 96px;
  border-left: 2px solid var(--border-ink);
  padding-left: 1rem; display: flex; flex-direction: column; gap: .35rem;
}
.api-toc a {
  font-size: .82rem; color: var(--text-muted); padding: .2rem 0;
  transition: color .2s;
}
.api-toc a:hover { color: var(--ink-main); }
.api-toc .toc-h {
  font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-main);
  margin: .8rem 0 .2rem;
}
.api-toc .toc-h:first-child { margin-top: 0; }

.api-endpoint {
  background: rgba(255,255,255,.85); border: 1px solid var(--border-ink);
  border-radius: var(--radius-md); padding: 1.4rem 1.6rem; margin-bottom: 1.4rem;
}
.api-sig {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin-bottom: .7rem;
}
.api-method {
  font-family: 'Inter', monospace; font-size: .68rem; font-weight: 700;
  letter-spacing: .05em; padding: .22rem .6rem; border-radius: 5px;
}
.api-method.get { background: rgba(0,144,64,.1); color: var(--ink-core); }
.api-method.ws { background: rgba(201,160,60,.14); color: #8a6a1e; }
.api-path {
  font-family: var(--font-mono); font-size: .92rem;
  color: var(--text-deep); font-weight: 600;
  /* 长 endpoint 在窄屏必须能断，否则整页横向滚动（中英同理）*/
  overflow-wrap: anywhere;
}
.api-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: .8rem; }
.api-params { font-size: .8rem; color: var(--text-body); margin: 0 0 .8rem; padding-left: 1.1rem; }
.api-params li { list-style: circle; margin-bottom: .2rem; }
.api-params code {
  font-family: Consolas, monospace; font-size: .78rem;
  background: var(--ink-frost); padding: .05rem .35rem; border-radius: 4px;
  color: var(--ink-core);
}

/* code blocks */
.code-block {
  background: #185236; border-radius: 10px; overflow: auto;
  margin: .6rem 0 0; position: relative;
  border: 1px solid rgba(0,144,64,.4);
}
.code-block pre {
  margin: 0; padding: 1rem 1.2rem;
  font-family: 'Consolas', 'SF Mono', Menlo, monospace;
  font-size: .78rem; line-height: 1.65; color: #d9efe0;
  white-space: pre; tab-size: 2;
}
.code-block .cb-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .45rem 1.2rem; border-bottom: 1px solid rgba(120,208,152,.15);
  font-family: 'Inter', sans-serif; font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-light);
  position: sticky; top: 0; z-index: 3; background: #123a26;
}
.code-block .k { color: #78d098; }
.code-block .s { color: #f0dca0; }
.code-block .c { color: #5f7a68; font-style: italic; }
.code-block .n { color: #9fd8ff; }

/* copy button */
.cb-copy {
  margin-left: auto;
  font-family: 'Inter', sans-serif; font-size: .62rem; letter-spacing: .06em;
  text-transform: uppercase; color: #bfe8cf;
  background: rgba(0,0,0,.28); border: 1px solid rgba(120,208,152,.3);
  border-radius: 999px; padding: .18rem .6rem; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.cb-copy:hover { background: rgba(0,144,64,.4); color: #eafaf0; border-color: rgba(120,208,152,.6); }
.cb-copy.copied { background: rgba(0,144,64,.55); color: #fff; border-color: #78d098; }
html.lang-en .cb-copy { font-family: var(--font-ui); }

.api-kv {
  display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem;
  font-size: .82rem; margin: .6rem 0;
}
.api-kv dt { font-family: Consolas, monospace; color: var(--ink-core); font-weight: 600; }
.api-kv dd { color: var(--text-muted); margin: 0; }

/* ═════════ ALERTS ═════════ */
.al-layout {
  display: grid; grid-template-columns: minmax(340px, 460px) 1fr; gap: 1.8rem;
  align-items: start;
}
.al-form { display: flex; flex-direction: column; gap: 1.1rem; }
.al-field label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--text-deep); margin-bottom: .4rem;
}
.al-field .hint { font-weight: 400; color: var(--text-muted); font-size: .72rem; }
.al-input, .al-field select {
  width: 100%; padding: .55rem .9rem;
  border: 1px solid var(--border-ink); border-radius: 8px;
  background: #fff; font-family: inherit; font-size: .88rem;
  color: var(--text-body); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.al-input:focus, .al-field select:focus {
  border-color: var(--ink-mint); box-shadow: 0 0 0 3px rgba(69,184,112,.12);
}
.al-inline { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.al-seg { display: flex; border: 1px solid var(--border-ink); border-radius: 8px; overflow: hidden; }
.al-seg button {
  flex: 1; padding: .5rem .4rem; background: #fff; border: none;
  font-family: inherit; font-size: .82rem; color: var(--text-muted);
  cursor: pointer; transition: all .2s;
}
.al-seg button + button { border-left: 1px solid var(--border-ink); }
.al-seg button.active { background: var(--ink-main); color: #fff; }

.al-channels { display: flex; flex-direction: column; gap: .6rem; }
.al-channel {
  display: flex; align-items: center; gap: .8rem;
  border: 1px solid var(--border-ink); border-radius: 10px;
  padding: .65rem .9rem; background: #fff; cursor: pointer;
  transition: border-color .2s;
}
.al-channel:hover { border-color: rgba(0,144,64,.3); }
.al-channel .ic { width: 20px; height: 20px; color: var(--ink-main); flex: none; }
.al-channel .meta { flex: 1; min-width: 0; }
.al-channel .meta b { font-size: .84rem; color: var(--text-deep); display: block; }
.al-channel .meta span { font-size: .7rem; color: var(--text-muted); }
.al-switch { position: relative; width: 40px; height: 22px; flex: none; }
.al-switch input { opacity: 0; width: 0; height: 0; }
.al-switch .tr {
  position: absolute; inset: 0; border-radius: 999px;
  background: #d5ddd7; transition: background .25s; cursor: pointer;
}
.al-switch .tr::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; top: 3px; left: 3px;
  transition: transform .25s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.al-switch input:checked + .tr { background: var(--ink-main); }
.al-switch input:checked + .tr::before { transform: translateX(18px); }

.al-btn {
  font-family: inherit; font-size: .95rem; font-weight: 600;
  padding: .75rem 1.4rem; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--ink-core), var(--ink-main));
  color: #fff; cursor: pointer; letter-spacing: .05em;
  transition: transform .2s ease, box-shadow .2s ease;
}
.al-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,112,40,.28); }
.al-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.al-list { display: flex; flex-direction: column; gap: .8rem; }
.al-item {
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--border-ink);
  border-radius: 12px; padding: .85rem 1.1rem;
}
.al-item .cond { flex: 1; min-width: 0; }
.al-item .cond b { font-size: .9rem; color: var(--text-deep); }
.al-item .cond .sub { font-size: .72rem; color: var(--text-muted); margin-top: .15rem; }
.al-item .chips { display: flex; gap: .3rem; flex: none; }
.al-item .chip {
  font-family: 'Inter', sans-serif; font-size: .62rem; font-weight: 600;
  background: var(--ink-frost); color: var(--ink-core);
  padding: .15rem .5rem; border-radius: 4px;
}
.al-item .del {
  flex: none; width: 26px; height: 26px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-muted); font-size: 1rem;
  cursor: pointer; transition: all .2s; line-height: 1;
}
.al-item .del:hover { background: rgba(220,38,38,.08); color: #dc2626; }
.al-state {
  font-family: 'Inter', sans-serif; font-size: .62rem; font-weight: 700;
  padding: .18rem .55rem; border-radius: 999px; flex: none;
}
.al-state.armed { background: rgba(0,144,64,.1); color: var(--ink-main); }
.al-state.hit { background: rgba(201,160,60,.15); color: #8a6a1e; }

.al-feed { display: flex; flex-direction: column; }
.al-feed-item {
  display: flex; gap: .9rem; padding: .8rem 0;
  border-bottom: 1px dashed var(--border-ink);
}
.al-feed-item:last-child { border-bottom: none; }
.al-feed-time {
  font-family: 'Inter', sans-serif; font-size: .7rem; color: var(--text-muted);
  flex: none; width: 92px; padding-top: .15rem;
}
.al-feed-body { font-size: .82rem; color: var(--text-body); line-height: 1.6; }
.al-feed-body b { color: var(--ink-deep); }
.al-feed-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); margin-top: .45rem;
  box-shadow: 0 0 0 3px rgba(201,160,60,.15);
}

/* ── shared small helpers ── */
.dp-disclaimer {
  margin-top: 2rem; padding: .9rem 1.2rem;
  background: rgba(201,160,60,.06); border: 1px solid rgba(201,160,60,.2);
  border-radius: 10px; font-size: .76rem; color: #8a6a1e; line-height: 1.7;
}
.dp-updated { font-family: 'Inter', sans-serif; font-size: .74rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   I18N — 英文排版适配（.lang-en）
   毛笔体（Ma Shan Zheng）无拉丁字形，标题必须整体切到拉丁字栈；
   字栈与行高一律引用 style.css :root 的 --font-latin* / --lh-*，
   英文文本约比中文长 1.4×，此处逐一处理溢出风险。
   ═══════════════════════════════════════════════════════════ */

/* 1) 标题：脱离毛笔体 */
html.lang-en .dp-panel-title,
html.lang-en .dp-cta .t {
  font-family: var(--font-latin-head);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: var(--lh-heading);
  overflow-wrap: break-word;
}
html.lang-en .dp-panel-title { font-size: 1.18rem; }
html.lang-en .dp-cta .t { font-size: 1.12rem; }
html.lang-en .dp-hero .hero-headline { font-size: clamp(1.9rem, 4.6vw, 3.2rem); }

/* 2) 正文 / 描述：拉丁字栈 + 断词 */
html.lang-en .dp-cta .d,
html.lang-en .dp-note,
html.lang-en .dp-empty,
html.lang-en .dp-disclaimer,
html.lang-en .api-desc,
html.lang-en .al-feed-body {
  font-family: var(--font-latin);
  line-height: var(--lh-body-en);
  overflow-wrap: break-word;
  hyphens: auto;
}
html.lang-en .dp-disclaimer { max-width: min(var(--measure), 100%); }

/* 3) 筛选 chip：英文品名（"Purified Terephthalic Acid"）远长于中文，
      放开 nowrap 并允许 chip 换行，避免工具条横向溢出 */
html.lang-en .dp-chip {
  font-family: var(--font-ui);
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: break-word;
  max-width: 100%;
  text-align: center;
  line-height: 1.35;
}
html.lang-en .dp-chips { row-gap: .45rem; }

/* 4) 行情卡：英文名会撑破卡片。中文名位省略号、英文副名允许两行 */
html.lang-en .dp-card .h { align-items: flex-start; }
html.lang-en .dp-card .nm {
  font-family: var(--font-latin);
  overflow-wrap: anywhere;
  hyphens: auto;
  line-height: 1.35;
  min-width: 0;
}
html.lang-en .dp-card .en {
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.3;
  max-width: 48%;
  text-align: right;
}
html.lang-en .dp-card .unit { overflow-wrap: anywhere; }

/* 5) 表格：表头英文更长，允许折行；数值列保持 nowrap + 等宽数字 */
html.lang-en .dp-table th {
  font-family: var(--font-ui);
  letter-spacing: .01em;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
}
html.lang-en .dp-table td { font-family: var(--font-ui); }
html.lang-en .dp-table .pair,
html.lang-en .dp-table td:first-child {
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}
html.lang-en .dp-table .note-cell {
  max-width: 320px;
  font-family: var(--font-latin);
  line-height: 1.55;
  hyphens: auto;
}

/* 6) 库存条：英文标签比中文宽，加宽标签列 */
html.lang-en .dp-bar-row { grid-template-columns: 160px 1fr 90px; }
html.lang-en .dp-bar-label {
  font-family: var(--font-latin);
  line-height: 1.3; overflow-wrap: break-word; hyphens: auto;
}

/* 7) API 文档：路径与代码块保持等宽体，不参与拉丁替换；
      参数说明与 TOC 走 UI 字体 */
html.lang-en .api-toc a,
html.lang-en .api-toc .toc-h { font-family: var(--font-ui); letter-spacing: .04em; }
html.lang-en .api-toc a { overflow-wrap: break-word; }
html.lang-en .api-params { font-family: var(--font-latin); line-height: 1.7; }
html.lang-en .api-kv dd { font-family: var(--font-latin); overflow-wrap: break-word; }
html.lang-en .api-path,
html.lang-en .api-kv dt,
html.lang-en .api-params code,
html.lang-en .code-block pre { font-family: var(--font-mono); }
html.lang-en .api-method { letter-spacing: .04em; }

/* 8) 预警页表单：label / 按钮 / 状态标 */
html.lang-en .al-field label,
html.lang-en .al-seg button,
html.lang-en .al-btn { font-family: var(--font-ui); letter-spacing: .01em; }
html.lang-en .al-btn { letter-spacing: .015em; }
html.lang-en .al-channel .meta b,
html.lang-en .al-item .cond b { font-family: var(--font-latin); overflow-wrap: break-word; }
html.lang-en .al-channel .meta span,
html.lang-en .al-item .cond .sub { overflow-wrap: break-word; line-height: 1.45; }
html.lang-en .al-state,
html.lang-en .al-item .chip { letter-spacing: .03em; white-space: nowrap; }
/* 英文条件串更长，让删除键与状态标不被挤出卡片 */
html.lang-en .al-item { flex-wrap: wrap; row-gap: .5rem; }
html.lang-en .al-feed-time { width: 104px; }

/* 9) 360px：英文最窄断点 */
@media (max-width: 380px) {
  html.lang-en .dp-panel-title { font-size: 1.05rem; }
  html.lang-en .dp-cta .t { font-size: 1rem; }
  html.lang-en .dp-chip { font-size: .74rem; padding: .34rem .7rem; }
  html.lang-en .dp-bar-row { grid-template-columns: 1fr; gap: .25rem; }
  html.lang-en .dp-bar-val { text-align: left; }
  html.lang-en .dp-card .en { max-width: 100%; text-align: left; }
  html.lang-en .dp-card .h { flex-direction: column; gap: .1rem; }
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .api-layout { grid-template-columns: minmax(0, 1fr); }
  .api-layout > * { min-width: 0; }
  .api-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: .3rem .9rem; border-left: none; padding-left: 0; }
  .api-toc .toc-h { display: none; }
  .api-toc a { font-size: .78rem; background: var(--ink-frost); padding: .25rem .7rem; border-radius: 999px; }
  .al-layout { grid-template-columns: 1fr; }
  .dp-cta-grid { grid-template-columns: 1fr; }
}
/* 与 style.css 的 .section 断点(768px→4rem)对齐，避免 640–768px 之间
   数据页与其他页面的版块留白出现跳变 */
@media (max-width: 768px) {
  .dp-section { padding: 3.6rem 0; }
}
@media (max-width: 640px) {
  .dp-hero { min-height: 48vh; padding: 110px 1.2rem 36px; }
  .dp-section { padding: 3.2rem 0; }
  .dp-panel { padding: 1.2rem 1rem; border-radius: var(--radius-md); }
  .dp-chart-wrap { height: 280px; }
  .dp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
  .dp-search { max-width: none; margin-left: 0; flex-basis: 100%; }
  .al-inline { grid-template-columns: 1fr; }
  .dp-bar-row { grid-template-columns: 92px 1fr 74px; gap: .5rem; }
}
