/* 博讯 · Dafabet shortcode 样式
 * 单独加载本文件；HTML 片段不含 style、link、脚本或完整文档外壳。
 * 所有选择器限定在 .bx-dafa。宿主页面提供 H1，片段从 H2 开始。
 * 顶部支持可扩展横向面包屑；移动端路径过长时横向滚动。
 * Footer 位于 .bx-body 内，只与正文列同宽。
 */

.bx-dafa {
  --bx-primary: #071b4b;
  --bx-primary-soft: #0c3478;
  --bx-accent: #ffc400;
  --bx-accent-deep: #b78000;
  --bx-ink: #243040;
  --bx-muted: #687486;
  --bx-gray: #f5f7fa;
  --bx-soft: #fff9dc;
  --bx-line: #dfe5ee;
  --bx-alert: #a83b3b;
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 24px 36px;
  color: var(--bx-ink);
  background: #fff;
  font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-wrap: anywhere;
  text-align: left;
}

.bx-dafa *, .bx-dafa *::before, .bx-dafa *::after { box-sizing: border-box; }
.bx-dafa h2, .bx-dafa h3, .bx-dafa h4, .bx-dafa p, .bx-dafa ul, .bx-dafa ol, .bx-dafa dl, .bx-dafa dd, .bx-dafa figure { margin: 0; padding: 0; }
.bx-dafa h2, .bx-dafa h3, .bx-dafa h4 { color: var(--bx-primary); font-weight: 750; }
.bx-dafa a { color: var(--bx-primary); text-decoration: none; text-underline-offset: 4px; }
.bx-dafa a:hover { color: #9b7000; text-decoration: underline; }
.bx-dafa a:focus-visible { outline: 3px solid var(--bx-accent); outline-offset: 4px; border-radius: 3px; }

/* 顶部面包屑：横向、靠左、不换行；超长路径允许横向滚动。 */
.bx-dafa .bx-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-width: 0;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--bx-line);
  font-size: 14px;
  color: var(--bx-muted);
}
.bx-dafa .bx-topline > a { font-weight: 750; }

.bx-dafa .bx-breadcrumb {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8abb0 transparent;
}
.bx-dafa .bx-breadcrumb::-webkit-scrollbar { height: 4px; }
.bx-dafa .bx-breadcrumb::-webkit-scrollbar-track { background: transparent; }
.bx-dafa .bx-breadcrumb::-webkit-scrollbar-thumb { background: #a8abb0; border-radius: 999px; }

.bx-dafa .bx-breadcrumb ol {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bx-dafa .bx-breadcrumb li {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0;
  color: var(--bx-muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: nowrap;
}
.bx-dafa .bx-breadcrumb li::marker { content: none; }
.bx-dafa .bx-breadcrumb li + li::before {
  content: "/";
  flex: 0 0 auto;
  margin: 0 8px;
  color: #a8abb0;
  font-weight: 400;
}
.bx-dafa .bx-breadcrumb a {
  color: var(--bx-primary);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.bx-dafa .bx-breadcrumb a:hover { color: #9b7000; text-decoration: underline; }
.bx-dafa .bx-breadcrumb [aria-current="page"] { color: var(--bx-muted); font-weight: 500; }

.bx-dafa .bx-topline-meta,
.bx-dafa .bx-topline > span {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--bx-muted);
  white-space: nowrap;
}

.bx-dafa .bx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 44px;
  padding: 36px 0 30px;
}
.bx-dafa .bx-kicker {
  color: var(--bx-primary);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .1em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bx-dafa .bx-kicker::before { content: ''; width: 24px; height: 3px; background: var(--bx-accent); }
.bx-dafa .bx-page-title { font-size: clamp(32px, 3.8vw, 44px); letter-spacing: -.035em; line-height: 1.28; margin-bottom: 4px; }
.bx-dafa .bx-english { color: var(--bx-muted); font-size: 19px; letter-spacing: .025em; margin-bottom: 15px; }
.bx-dafa .bx-lead { max-width: 660px; line-height: 1.85; color: #4f5967; }

.bx-dafa a.bx-official-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 20px;
  border: 1px solid var(--bx-primary);
  border-radius: 4px;
  background: var(--bx-primary) !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: none !important;
}
.bx-dafa a.bx-official-link,
.bx-dafa a.bx-official-link:link,
.bx-dafa a.bx-official-link:visited,
.bx-dafa a.bx-official-link:focus,
.bx-dafa a.bx-official-link:active,
.bx-dafa a.bx-official-link span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
.bx-dafa a.bx-official-link:hover,
.bx-dafa a.bx-official-link:focus-visible,
.bx-dafa a.bx-official-link:active {
  background: var(--bx-accent-deep) !important;
  border-color: var(--bx-accent-deep);
}
.bx-dafa a.bx-official-link span { position: relative; z-index: 1; }
.bx-dafa a.bx-official-link::before,
.bx-dafa a.bx-official-link::after { content: none !important; display: none !important; }
.bx-dafa a.bx-official-link:focus-visible { outline: 3px solid var(--bx-accent) !important; outline-offset: 4px; }

/* 品牌区：Logo 为 HTML 内联 SVG。 */
.bx-dafa .bx-logo-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #04112f 0%, #071b4b 58%, #0e438d 100%);
  border: 1px solid #153c7f;
  border-radius: 7px;
  padding: 27px 22px 18px;
  text-align: center;
}
.bx-dafa .bx-logo-panel::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -92px;
  top: -105px;
  border: 1px solid color-mix(in srgb, var(--bx-accent) 45%, transparent);
  border-radius: 50%;
}
.bx-dafa .bx-logo-panel::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 45px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bx-accent) 70%, transparent), transparent);
}
.bx-dafa .bx-brand-svg { position: relative; z-index: 1; display: block; width: 100%; height: auto; overflow: visible; }
.bx-dafa .bx-logo-panel figcaption { position: relative; z-index: 1; color: #e2e7ee; font-size: 13px; letter-spacing: .12em; margin-top: 10px; }

.bx-dafa .bx-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--bx-line);
  border-top: 3px solid var(--bx-accent);
  border-radius: 0 0 6px 6px;
  background: var(--bx-gray);
  margin-bottom: 34px;
}
.bx-dafa .bx-fact { padding: 16px 22px; }
.bx-dafa .bx-fact:nth-child(n+4) { border-top: 1px solid var(--bx-line); }
.bx-dafa .bx-fact:not(:nth-child(3n)) { border-right: 1px solid var(--bx-line); }
.bx-dafa .bx-fact dt { color: var(--bx-muted); font-size: 14px; margin-bottom: 4px; }
.bx-dafa .bx-fact dd { font-weight: 650; color: var(--bx-primary); font-size: 16px; }

.bx-dafa .bx-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 34px; align-items: start; }
.bx-dafa .bx-toc { position: sticky; top: 48px; border: 1px solid var(--bx-line); border-radius: 6px; padding: 19px 14px; background: #fff; }
.bx-dafa .bx-toc h3 { font-size: 16px; margin: 0 8px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--bx-line); }
.bx-dafa .bx-toc ol { list-style: none; display: grid; gap: 5px; }
.bx-dafa .bx-toc a { display: flex; gap: 10px; padding: 9px 8px; font-size: 14px; line-height: 1.5; border-radius: 4px; color: #505a68; }
.bx-dafa .bx-toc a:hover, .bx-dafa .bx-toc a:focus-visible { color: var(--bx-primary); background: var(--bx-soft); }
.bx-dafa .bx-toc a span { color: var(--bx-accent-deep); font-variant-numeric: tabular-nums; font-weight: 700; }

.bx-dafa .bx-body { min-width: 0; }
.bx-dafa .bx-section { scroll-margin-top: 110px; padding-bottom: 32px; margin-bottom: 30px; border-bottom: 1px solid var(--bx-line); }
.bx-dafa .bx-section.bx-section-last { margin-bottom: 0; border-bottom: 0; }
.bx-dafa .bx-section:target .bx-section-heading { background: var(--bx-soft); border-radius: 4px; }
.bx-dafa .bx-section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.bx-dafa .bx-section-heading h3 { font-size: 24px; line-height: 1.45; letter-spacing: -.02em; }
.bx-dafa .bx-section-marker { width: 4px; height: 23px; flex: 0 0 4px; background: var(--bx-accent); border-radius: 1px; }
.bx-dafa .bx-body p + p { margin-top: 14px; }
.bx-dafa .bx-body strong { font-weight: 650; }
.bx-dafa .bx-body ul { padding-left: 22px; margin-top: 14px; }
.bx-dafa .bx-body li { margin-top: 10px; }
.bx-dafa .bx-body li::marker { color: var(--bx-accent-deep); }

.bx-dafa .bx-timeline { position: relative; margin: 22px 0 0 6px; border-left: 2px solid var(--bx-line); padding-left: 24px; }
.bx-dafa .bx-timeline-item { position: relative; padding-bottom: 25px; }
.bx-dafa .bx-timeline-item:last-child { padding-bottom: 0; }
.bx-dafa .bx-timeline-item::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  left: -30px;
  top: 9px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--bx-primary);
  background: var(--bx-accent);
  border-radius: 50%;
}
.bx-dafa .bx-timeline-year { color: var(--bx-primary); font-weight: 700; margin-bottom: 5px; font-size: 17px; }
.bx-dafa .bx-timeline-desc { color: #5b6572; line-height: 1.8; }

.bx-dafa .bx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.bx-dafa .bx-card { position: relative; overflow: hidden; padding: 22px; background: var(--bx-gray); border: 1px solid var(--bx-line); border-radius: 6px; }
.bx-dafa .bx-card::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 58px; height: 3px; background: var(--bx-accent); }
.bx-dafa .bx-card h4 { font-size: 18px; line-height: 1.5; margin-bottom: 10px; }
.bx-dafa .bx-card p { color: #5b6572; font-size: 16px; }

.bx-dafa .bx-license-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.bx-dafa .bx-license-tag { background: var(--bx-soft); color: var(--bx-primary); border: 1px solid var(--bx-line); border-radius: 4px; padding: 7px 12px; font-size: 14px; }
.bx-dafa a.bx-license-tag {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bx-primary) !important;
  -webkit-text-fill-color: var(--bx-primary) !important;
  background: var(--bx-soft) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}
.bx-dafa a.bx-license-tag::before,
.bx-dafa a.bx-license-tag::after { content: none !important; display: none !important; }
.bx-dafa a.bx-license-tag:hover,
.bx-dafa a.bx-license-tag:focus-visible {
  color: var(--bx-accent-deep) !important;
  -webkit-text-fill-color: var(--bx-accent-deep) !important;
  border-color: var(--bx-accent);
  background: #fff !important;
}

.bx-dafa .bx-note { margin-top: 20px; padding: 19px 22px; background: #faf4f5; border-left: 3px solid var(--bx-alert); border-radius: 0 5px 5px 0; font-size: 16px; }
.bx-dafa .bx-note strong { color: var(--bx-alert); display: block; margin-bottom: 6px; }

/* Footer 位于 .bx-body 内，只与正文列同宽。 */
.bx-dafa .bx-body > .bx-footer { border-top: 1px solid var(--bx-line); margin-top: 28px; padding-top: 22px; color: var(--bx-muted); font-size: 14px; }
.bx-dafa .bx-footer-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.bx-dafa .bx-footer-top strong { color: var(--bx-primary); }
.bx-dafa .bx-footer p { line-height: 1.8; }

@media (max-width: 1024px) {
  .bx-dafa .bx-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bx-dafa .bx-toc { position: static; padding: 17px; }
  .bx-dafa .bx-toc ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bx-dafa .bx-grid { grid-template-columns: minmax(0, 1fr); }
  .bx-dafa .bx-hero { grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; }
}

@media (max-width: 680px) {
  .bx-dafa { padding: 20px 18px 28px; }
  .bx-dafa .bx-topline > span, .bx-dafa .bx-topline-meta { display: none; }
  .bx-dafa .bx-breadcrumb { width: 100%; max-width: 100%; }
  .bx-dafa .bx-breadcrumb li { font-size: 13px; }
  .bx-dafa .bx-breadcrumb li + li::before { margin: 0 6px; }
  .bx-dafa .bx-hero { grid-template-columns: minmax(0, 1fr); padding: 26px 0 24px; gap: 22px; }
  .bx-dafa .bx-logo-panel { width: 100%; max-width: 340px; padding: 21px 24px 16px; }
  .bx-dafa .bx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
  .bx-dafa .bx-fact { padding: 13px 14px; }
  .bx-dafa .bx-fact:not(:nth-child(3n)) { border-right: 0; }
  .bx-dafa .bx-fact:nth-child(odd) { border-right: 1px solid var(--bx-line); }
  .bx-dafa .bx-fact:nth-child(n+3) { border-top: 1px solid var(--bx-line); }
  .bx-dafa .bx-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .bx-dafa .bx-toc { padding: 14px 10px; }
  .bx-dafa .bx-section-heading h3 { font-size: 21px; }
  .bx-dafa .bx-section { padding-bottom: 25px; margin-bottom: 25px; }
  .bx-dafa .bx-card { padding: 18px; }
  .bx-dafa .bx-note { padding: 16px 18px; }
  .bx-dafa .bx-footer-top { flex-wrap: wrap; }
}

@media print {
  .bx-dafa { max-width: none; padding: 0; color: #111; }
  .bx-dafa .bx-layout, .bx-dafa .bx-hero { display: block; }
  .bx-dafa .bx-toc, .bx-dafa .bx-logo-panel, .bx-dafa .bx-footer-top a { display: none; }
  .bx-dafa .bx-section, .bx-dafa .bx-card, .bx-dafa .bx-timeline-item { break-inside: avoid; }
}
