/*
 * 4 号板块独立预览样式。
 * 仅作用于 data-section04-links，按 Dub Links 的 2×2 大网格与四列能力条重建。
 */

[data-section04-links] {
  --s04-border: #e5e5e5;
  --s04-border-strong: #d4d4d4;
  --s04-text: #171717;
  --s04-title: #404040;
  --s04-muted: #737373;
  --s04-soft: #fafafa;
  --s04-orange: #ea580c;
  --s04-green: #16a34a;
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #fff;
  scroll-margin-top: 56px;
}

[data-section04-links]::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 100vw;
  height: 1px;
  transform: translateX(50%);
  background: var(--s04-border);
  pointer-events: none;
}

/* 4 号能力条与紧随其后的内容区直接衔接，避免生成空白过渡带。 */
[data-section04-links] + #resources {
  padding-top: 0;
}

[data-section04-links] .s04-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

[data-section04-links] .s04-major-grid,
[data-section04-links] .s04-compact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--s04-border);
}

[data-section04-links] .s04-major-grid {
  border-top: 0;
  align-items: stretch;
}

[data-section04-links] .s04-major-card,
[data-section04-links] .s04-compact-card {
  min-width: 0;
  background: #fff;
}

[data-section04-links] .s04-major-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 40px;
  padding: 24px 16px;
}

[data-section04-links] .s04-visual {
  position: relative;
  height: 288px;
  min-height: 288px;
  display: flex;
  flex: 0 0 288px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

[data-section04-links] .s04-major-copy {
  position: relative;
  top: 8px;
  z-index: 2;
  flex: 0 0 auto;
  color: var(--s04-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

[data-section04-links] .s04-major-copy h3,
[data-section04-links] .s04-compact-card h3 {
  margin: 0;
  color: var(--s04-title);
  font-weight: 600;
}

[data-section04-links] .s04-major-copy h3 {
  font-size: 20px;
  line-height: 28px;
}

[data-section04-links] .s04-major-copy p {
  max-width: 520px;
  margin: 4px 0 12px;
  color: var(--s04-muted);
}

[data-section04-links] .s04-more {
  position: relative;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--s04-border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--s04-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
  transition: background-color 75ms ease, border-color 75ms ease, box-shadow 75ms ease;
}

[data-section04-links] .s04-more::after {
  content: "";
  position: absolute;
  inset: -6px;
}

[data-section04-links] .s04-more:focus-visible {
  border-color: var(--s04-text);
  outline: 1px solid var(--s04-text);
  outline-offset: 1px;
}

/* 预览卡 */
[data-section04-links] .s04-preview-panel {
  position: relative;
  width: min(345px, 100%);
  height: 289px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--s04-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.055);
}

[data-section04-links] .s04-panel-head,
[data-section04-links] .s04-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--s04-text);
  font-size: 12px;
  line-height: 18px;
}

[data-section04-links] .s04-panel-head strong,
[data-section04-links] .s04-rule-head strong {
  font-weight: 500;
}

[data-section04-links] kbd {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 1px solid var(--s04-border);
  border-radius: 5px;
  background: #fff;
  color: var(--s04-title);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  box-shadow: none;
}

[data-section04-links] .s04-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 8px;
  color: var(--s04-title);
  font-size: 11px;
  line-height: 16px;
}

[data-section04-links] .s04-field-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--s04-muted);
}

[data-section04-links] .s04-field-tools svg {
  width: 12px;
  height: 12px;
}

[data-section04-links] .s04-brand-canvas {
  position: relative;
  height: 168px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--s04-border);
  border-radius: 4px;
  background-color: #fafafa;
  background-image:
    linear-gradient(to right, rgba(229, 229, 229, 0.58) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 229, 229, 0.52) 1px, transparent 1px),
    radial-gradient(circle at 28% 58%, rgba(45, 212, 191, 0.11), transparent 31%),
    radial-gradient(circle at 72% 42%, rgba(249, 115, 22, 0.09), transparent 28%),
    radial-gradient(circle at 55% 74%, rgba(124, 58, 237, 0.09), transparent 31%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

[data-section04-links] .s04-brand-canvas strong {
  position: relative;
  z-index: 1;
  color: #050505;
  font-family: var(--font-satoshi);
  font-size: clamp(42px, 9vw, 62px);
  font-weight: 600;
  letter-spacing: -0.08em;
  line-height: 1;
}

[data-section04-links] .s04-fade-field {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: 15px;
  color: #a3a3a3;
  font-size: 10px;
  line-height: 14px;
}

[data-section04-links] .s04-fade-field i {
  width: 100%;
  height: 22px;
  border: 1px solid #f1f1f1;
  border-radius: 5px;
  background: #fff;
}

[data-section04-links] .s04-fade-field::after,
[data-section04-links] .s04-rule-stack::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  left: -4px;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 78%);
  pointer-events: none;
}

/* 所有群组总览：复刻 Dub Links 的三层数据卡视角，仅作用于左上第一项。 */
[data-section04-links] .s04-overview-scene {
  width: 100%;
  height: 100%;
  cursor: default;
  user-select: none;
  -webkit-mask-image: radial-gradient(120% 100% at 0% 0%, #000 80%, transparent 100%);
  mask-image: radial-gradient(120% 100% at 0% 0%, #000 80%, transparent 100%);
}

[data-section04-links] .s04-overview-visual {
  width: min(458px, 100%);
  display: block;
  align-self: center;
}

[data-section04-links] .s04-overview-stack {
  position: relative;
  width: 70%;
  transform: rotateX(-18deg) rotateY(23deg);
}

[data-section04-links] .s04-overview-layer {
  --s04-x: 0px;
  --s04-y: 0px;
  --s04-opacity: 0.3;
  position: static;
  width: 100%;
  min-height: 500px;
  opacity: var(--s04-opacity);
  transform: translate3d(var(--s04-x), var(--s04-y), 0);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

[data-section04-links] .s04-overview-layer:nth-child(2) {
  --s04-x: 55px;
  --s04-y: 55px;
  --s04-opacity: 0.8;
}

[data-section04-links] .s04-overview-layer:nth-child(3) {
  --s04-x: 110px;
  --s04-y: 110px;
  --s04-opacity: 1.3;
}

[data-section04-links] .s04-overview-layer:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
}

[data-section04-links] .s04-overview-card {
  min-height: 1000px;
  padding: 16px;
  border: 1px solid var(--s04-border);
  border-radius: 16px;
  background: #fff;
  text-rendering: geometricPrecision;
}

[data-section04-links] .s04-overview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #404040;
  font-size: 16px;
  line-height: 20px;
}

[data-section04-links] .s04-overview-head strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-section04-links] .s04-overview-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid var(--s04-border);
  border-radius: 8px;
  background: #fff;
  color: #262626;
}

[data-section04-links] .s04-overview-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

[data-section04-links] .s04-overview-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

[data-section04-links] .s04-overview-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px;
  color: var(--s04-title);
  font-size: 16px;
  line-height: 20px;
}

[data-section04-links] .s04-overview-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--s04-fill);
  height: 100%;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.01);
  pointer-events: none;
}

[data-section04-links] .s04-overview-row > :not(.s04-overview-fill) {
  position: relative;
  z-index: 1;
}

[data-section04-links] .s04-overview-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-section04-links] .s04-overview-label svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #262626;
  stroke-width: 1.8;
}

[data-section04-links] .s04-overview-label b {
  overflow: hidden;
  font-weight: 500;
  color: #404040;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-section04-links] .s04-overview-row em {
  color: #737373;
  font-size: 16px;
  font-style: normal;
  line-height: 20px;
  white-space: nowrap;
}

/* 第一项群组目录：按 Dub Links 自定义域名列表的真实尺寸与错位关系复刻。 */
[data-section04-links] .s04-overview-visual {
  width: min(458px, 100%);
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
}

[data-section04-links] .s04-overview-directory {
  position: relative;
  width: 100%;
  height: 248px;
  flex: 0 0 100%;
  user-select: none;
}

[data-section04-links] .s04-overview-list {
  width: 100%;
  height: 248px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
}

[data-section04-links] .s04-overview-item {
  width: 100%;
  flex: 0 0 76px;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section04-links] .s04-overview-entry {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: calc((var(--s04-index) + 1) * 5%);
  padding: 16px;
  overflow: visible;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  color: #171717;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: default;
  white-space: nowrap;
}

[data-section04-links] .s04-overview-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: linear-gradient(to top, #f5f5f5, #fff);
  color: #171717;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

[data-section04-links] .s04-overview-mark svg {
  width: 20px;
  height: 20px;
  color: #404040;
  stroke-width: 1.7;
}

[data-section04-links] .s04-overview-entry > strong {
  flex: 0 0 auto;
  color: #171717;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

[data-section04-links] .s04-overview-metric,
[data-section04-links] .s04-overview-primary {
  min-height: 28px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fafafa;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}

[data-section04-links] .s04-overview-metric {
  margin-left: 8px;
  color: #737373;
}

[data-section04-links] .s04-overview-primary {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #2563eb;
}

[data-section04-links] .s04-overview-metric svg,
[data-section04-links] .s04-overview-primary svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 1.5;
}

[data-section04-links] .s04-overview-metric b {
  display: none;
  font-weight: inherit;
}

[data-section04-links] .s04-overview-claim {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  transform: translateY(-50%);
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: 8px;
  background: linear-gradient(to right, #ecfccb, #d1fae5);
  color: #262626;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section04-links] .s04-overview-claim svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #166534;
  stroke-width: 1.5;
}

/* 第二项 NSFW 处置规则：保留 Dub UTM Builder 的 395px 面板与 70% 渐隐，增加一次性处置状态机。 */
[data-section04-links] .s04-custom-visual {
  align-items: flex-start;
  padding: 0 16px;
  -webkit-mask-image: linear-gradient(#000 70%, transparent 100%);
  mask-image: linear-gradient(#000 70%, transparent 100%);
}

[data-section04-links] .s04-custom-stage {
  width: min(395px, 100%);
  flex: 0 0 auto;
  cursor: default;
  user-select: none;
}

[data-section04-links] .s04-custom-status {
  position: relative;
  min-height: 58px;
  overflow: hidden;
  border: 1px solid var(--s04-border-strong);
  border-radius: 8px;
  background: var(--s04-soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: #525252;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 20px;
  word-break: break-all;
  transition: border-color 180ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section04-links] .s04-custom-status-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  opacity: 0;
  transform: scale(0.92);
  color: #525252;
  white-space: nowrap;
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section04-links] .s04-custom-status-state > span:not(.s04-custom-countdown-track) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-section04-links] .s04-custom-status-state svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 1.7;
}

[data-section04-links] .s04-custom-status-scan svg {
  color: #737373;
}

[data-section04-links] .s04-custom-status-countdown svg {
  color: #dc2626;
}

[data-section04-links] .s04-custom-status-countdown em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #fecaca;
  border-radius: 5px;
  background: #fef2f2;
  color: #b91c1c;
  font-style: normal;
}

[data-section04-links] .s04-custom-status-countdown em b {
  min-width: 1ch;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

[data-section04-links] .s04-custom-status-done svg {
  color: #22c55e;
  fill: currentColor;
  stroke: #fff;
  stroke-width: 2;
}

[data-section04-links] .s04-custom-countdown-track {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #ef4444;
  transform: scaleX(1);
  transform-origin: left center;
}

[data-section04-links] .s04-custom-stage[data-custom-phase="scan"] .s04-custom-status-scan,
[data-section04-links] .s04-custom-stage[data-custom-phase="countdown"] .s04-custom-status-countdown,
[data-section04-links] .s04-custom-stage[data-custom-phase="done"] .s04-custom-status-done {
  opacity: 1;
  transform: scale(1);
}

[data-section04-links] .s04-custom-stage[data-custom-phase="countdown"] .s04-custom-status {
  border-color: #fecaca;
  background: #fffafa;
}

[data-section04-links] .s04-custom-stage[data-custom-phase="done"] .s04-custom-status {
  border-color: #bbf7d0;
  background: #f9fffb;
}

[data-section04-links] .s04-custom-stage[data-custom-phase="countdown"] .s04-custom-countdown-track {
  animation: s04-custom-countdown 3s linear forwards;
}

@keyframes s04-custom-countdown {
  to {
    transform: scaleX(0);
  }
}

[data-section04-links] .s04-custom-panel {
  width: 100%;
  min-height: 352px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--s04-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

[data-section04-links] .s04-custom-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-section04-links] .s04-custom-head h4 {
  margin: 0;
  color: var(--s04-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

[data-section04-links] .s04-custom-head kbd {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--s04-border);
  border-radius: 6px;
  background: #fff;
  color: var(--s04-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

[data-section04-links] .s04-custom-fields {
  display: grid;
  gap: 12px;
}

[data-section04-links] .s04-custom-field {
  min-height: 35px;
  display: grid;
  grid-template-columns: minmax(100px, 112px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--s04-border-strong);
  border-radius: 6px;
  color: var(--s04-muted);
  font-size: 14px;
  line-height: 20px;
}

[data-section04-links] .s04-custom-field > span,
[data-section04-links] .s04-custom-field > b {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 6px 12px;
}

[data-section04-links] .s04-custom-field > span {
  gap: 6px;
  border-right: 1px solid var(--s04-border-strong);
  background: var(--s04-soft);
  color: #404040;
  white-space: nowrap;
}

[data-section04-links] .s04-custom-field > span svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 1.5;
}

[data-section04-links] .s04-custom-field > b {
  overflow: hidden;
  background: #fff;
  color: #262626;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 群组阶梯 */
[data-section04-links] .s04-group-stack {
  position: relative;
  width: min(436px, 100%);
  padding-top: 31px;
}

[data-section04-links] .s04-groups-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  width: 24%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 92%);
  pointer-events: none;
}

[data-section04-links] .s04-claim {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: 7px;
  background: linear-gradient(90deg, #ecfccb, #d1fae5);
  color: #166534;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

[data-section04-links] .s04-claim svg {
  width: 15px;
  height: 15px;
}

[data-section04-links] .s04-group-row {
  width: calc(100% - 48px);
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--s04-border);
  border-radius: 12px;
  background: #fff;
  color: var(--s04-title);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section04-links] .s04-group-row:nth-of-type(2) {
  margin-left: 24px;
}

[data-section04-links] .s04-group-row:nth-of-type(3) {
  margin-left: 48px;
}

[data-section04-links] .s04-group-row-primary {
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 0;
}

[data-section04-links] .s04-group-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--s04-border);
  border-radius: 50%;
  background: #fafafa;
  color: #050505;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

[data-section04-links] .s04-group-row strong {
  overflow: hidden;
  color: var(--s04-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-section04-links] .s04-group-metric {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--s04-border);
  border-radius: 6px;
  background: #fafafa;
  color: var(--s04-muted);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

[data-section04-links] .s04-group-metric svg {
  width: 13px;
  height: 13px;
}

[data-section04-links] .s04-group-row em {
  display: none;
  min-height: 28px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
  white-space: nowrap;
}

/* 规则构建器 */
[data-section04-links] .s04-rule-stack {
  position: relative;
  width: min(396px, 100%);
  padding-bottom: 18px;
}

[data-section04-links] .s04-rule-url {
  position: relative;
  min-height: 58px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--s04-border-strong);
  border-radius: 8px;
  background: #fafafa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

[data-section04-links] .s04-rule-url code {
  grid-area: 1 / 1;
  overflow-wrap: anywhere;
  color: var(--s04-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  transform: scale(1);
  transform-origin: center;
  transition: opacity 150ms ease, transform 150ms ease;
}

[data-section04-links] .s04-rule-url [data-url-state="short"] {
  opacity: 0;
  transform: scale(1.25);
}

[data-section04-links] .s04-rule-url.s04-url-is-short [data-url-state="long"] {
  opacity: 0;
  transform: scale(0.5);
}

[data-section04-links] .s04-rule-url.s04-url-is-short [data-url-state="short"] {
  opacity: 1;
  transform: scale(1);
}

[data-section04-links] .s04-rule-panel {
  margin-top: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--s04-border-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.045);
}

[data-section04-links] .s04-rule-head {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 20px;
}

[data-section04-links] .s04-rule-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(106px, 0.9fr) 1.5fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--s04-border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--s04-muted);
  font-size: 12px;
  line-height: 18px;
}

[data-section04-links] .s04-rule-row + .s04-rule-row {
  margin-top: 11px;
}

[data-section04-links] .s04-rule-row > span,
[data-section04-links] .s04-rule-row > b {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 11px;
}

[data-section04-links] .s04-rule-row > span {
  gap: 7px;
  border-right: 1px solid var(--s04-border-strong);
  white-space: nowrap;
}

[data-section04-links] .s04-rule-row > span svg {
  width: 14px;
  height: 14px;
}

[data-section04-links] .s04-rule-row > b {
  overflow: hidden;
  color: var(--s04-title);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-section04-links] .s04-rule-row-ghost {
  opacity: 0.42;
}

/* 标准策略：按 Dub Creators 的来源签、主卡和纵向能力栈复刻。 */
[data-section04-links] .s04-major-card.s04-standard-card {
  gap: 8px;
}

[data-section04-links] .s04-visual.s04-standard-visual {
  box-sizing: border-box;
  width: calc(100% + 32px);
  height: 320px;
  min-height: 320px;
  flex-basis: 320px;
  align-items: flex-start;
  margin-right: -16px;
  margin-left: -16px;
  padding: 24px 20px 0;
}

[data-section04-links] .s04-standard-stage {
  box-sizing: border-box;
  width: 100%;
  height: 296px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
}

[data-section04-links] .s04-standard-source {
  box-sizing: border-box;
  width: fit-content;
  min-width: min(202px, 100%);
  min-height: 32px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 15px 5px;
  border: 1px solid rgb(22 163 74 / 15%);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
}

[data-section04-links] .s04-standard-source svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: #16a34a;
  stroke-width: 2;
}

[data-section04-links] .s04-standard-core {
  box-sizing: border-box;
  width: fit-content;
  min-width: min(298px, 100%);
  max-width: 100%;
  height: 56px;
  min-height: 56px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 24px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  background: linear-gradient(#fff, #fafafa);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 1.8%),
    0 4px 12px rgb(0 0 0 / 1.6%);
}

[data-section04-links] .s04-standard-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #fafafa;
  color: #525252;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

[data-section04-links] .s04-standard-mark svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

[data-section04-links] .s04-standard-core strong {
  min-width: 0;
  overflow: hidden;
  color: #404040;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-section04-links] .s04-standard-mask {
  width: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#0000, #000c 5%, #000c 30%, #0000);
  mask-image: linear-gradient(#0000, #000c 5%, #000c 30%, #0000);
}

[data-section04-links] .s04-standard-track {
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: s04-standard-scroll 20s linear infinite;
  will-change: transform;
}

[data-section04-links] .s04-standard-group {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
}

[data-section04-links] .s04-standard-pill {
  box-sizing: border-box;
  width: fit-content;
  min-width: min(168px, 100%);
  height: 38px;
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: none;
}

[data-section04-links] .s04-standard-pill svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: #0a0a0a;
  stroke-width: 1.8;
}

[data-section04-links] .s04-standard-pill b {
  color: #404040;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
}

/* 第四卡：上百种配置，自由组合 */
[data-section04-links] .s04-major-card.s04-filters-card {
  gap: 40px;
}

[data-section04-links] .s04-visual.s04-filters-visual {
  box-sizing: border-box;
  width: calc(100% + 32px);
  height: 320px;
  min-height: 320px;
  flex-basis: 320px;
  align-items: flex-start;
  margin-right: -16px;
  margin-left: -16px;
  overflow: clip;
}

[data-section04-links] .s04-filters-stage {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 538px;
  height: 320px;
  padding: 24px 20px 0;
}

[data-section04-links] .s04-filters-fade {
  box-sizing: border-box;
  width: 100%;
  height: 312px;
  padding: 16px 0 0 16px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent);
  mask-image: linear-gradient(#000 30%, transparent);
}

[data-section04-links] .s04-filter-rows {
  width: 100%;
  height: 296px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

[data-section04-links] .s04-filter-row {
  width: 100%;
  height: 36px;
  display: flex;
  flex: 0 0 36px;
  align-items: center;
}

[data-section04-links] .s04-filter-run {
  height: 36px;
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 16px;
  animation: s04-filter-scroll 30s linear infinite;
  will-change: transform;
}

[data-section04-links] .s04-filter-row:nth-child(even) .s04-filter-run {
  animation-direction: reverse;
}

[data-section04-links] .s04-filter-chip {
  height: 36px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: rgb(255 255 255 / 94%);
  color: #262626;
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
  white-space: nowrap;
}

[data-section04-links] .s04-filter-chip > span {
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

[data-section04-links] .s04-filter-chip > span + span {
  border-left: 1px solid #e5e5e5;
}

[data-section04-links] .s04-filter-chip > span:last-child {
  color: #a3a3a3;
}

[data-section04-links] .s04-filter-chip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 1.5;
}

[data-section04-links] .s04-filter-chip > span:last-child svg {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

[data-section04-links] .s04-filter-chip svg.s04-filter-accent {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 6px;
}

[data-section04-links] .s04-filter-accent--blue {
  background: #eff6ff;
  color: #3b82f6;
}

[data-section04-links] .s04-filter-accent--purple {
  background: #f3e8ff;
  color: #a855f7;
}

[data-section04-links] .s04-filter-accent--green {
  background: #ecfdf5;
  color: #22a06b;
}

[data-section04-links] .s04-filter-accent--cyan {
  background: #ecfeff;
  color: #0891b2;
}

[data-section04-links] .s04-filter-accent--orange {
  background: #fff7ed;
  color: #f97316;
}

@keyframes s04-filter-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@keyframes s04-standard-scroll {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

/* 自动分流示意 */
[data-section04-links] .s04-route-stage {
  position: relative;
  width: min(406px, 100%);
  height: 280px;
}

[data-section04-links] .s04-route-visual {
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
}

[data-section04-links] .s04-route-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #d4d4d4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

[data-section04-links] .s04-route-lines path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-section04-links] .s04-route-particle {
  color: #5e5e5e;
}

[data-section04-links] .s04-route-particle circle {
  fill: currentColor;
  stroke: none;
}

[data-section04-links] .s04-route-particle .s04-route-halo {
  opacity: 0.24;
  filter: url(#s04-route-glow);
}

[data-section04-links] .s04-route-particle-blue {
  color: #229df3;
}

[data-section04-links] .s04-route-particle-green {
  color: #34a853;
}

[data-section04-links] .s04-route-top,
[data-section04-links] .s04-route-node,
[data-section04-links] .s04-route-phone {
  position: absolute;
  z-index: 1;
  border: 1px solid var(--s04-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

[data-section04-links] .s04-route-top {
  top: 15px;
  left: 50%;
  min-width: 188px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 9px;
  transform: translateX(-50%);
}

[data-section04-links] .s04-route-top span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--s04-border);
  border-radius: 50%;
  background: #fafafa;
  color: #050505;
  font-size: 11px;
  font-weight: 600;
}

[data-section04-links] .s04-route-top strong {
  color: var(--s04-title);
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

[data-section04-links] .s04-route-node {
  top: 122px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

[data-section04-links] .s04-route-node-left {
  left: 0;
  color: #2563eb;
}

[data-section04-links] .s04-route-node-right {
  right: 0;
  color: #16a34a;
}

[data-section04-links] .s04-route-node svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

[data-section04-links] .s04-route-phone {
  bottom: -1px;
  left: 50%;
  width: 168px;
  height: 102px;
  padding: 9px 10px 0;
  overflow: hidden;
  border: 2px solid #737373;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(#525252 0 34px, #fff 34px 100%);
  transform: translateX(-50%);
}

[data-section04-links] .s04-phone-head {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

[data-section04-links] .s04-phone-head b {
  font-size: 16px;
  line-height: 1;
}

[data-section04-links] .s04-phone-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

[data-section04-links] .s04-phone-head svg {
  width: 10px;
  height: 10px;
}

[data-section04-links] .s04-route-phone > small {
  display: block;
  margin: 8px 0 6px;
  color: #a3a3a3;
  font-size: 8px;
  line-height: 12px;
}

[data-section04-links] .s04-route-phone > div:last-child {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

[data-section04-links] .s04-route-phone > div:last-child span {
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 5px 5px 0 0;
  background: #fafafa;
  color: #a3a3a3;
  font-size: 8px;
}

[data-section04-links] .s04-route-phone > div:last-child svg {
  width: 12px;
  height: 12px;
}

/* 底部四列能力 */
[data-section04-links] .s04-compact-grid {
  border-top: 1px solid var(--s04-border);
  border-bottom: 1px solid var(--s04-border);
}

[data-section04-links] .s04-compact-card {
  min-height: 246px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 24px;
  transition: background-color 180ms ease;
}

[data-section04-links] .s04-compact-card > svg {
  width: 16px;
  height: 16px;
  color: var(--s04-orange);
  stroke-width: 1.8;
}

[data-section04-links] .s04-compact-card h3 {
  margin-top: 5px;
  font-size: 14px;
  line-height: 20px;
}

[data-section04-links] .s04-compact-card p {
  margin: 8px 0 20px;
  color: var(--s04-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

[data-section04-links] .s04-compact-card .s04-more {
  margin-top: 0;
}

@media (min-width: 640px) {
  [data-section04-links] {
    padding-top: 0;
    padding-bottom: 0;
  }

  [data-section04-links] .s04-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-section04-links] .s04-compact-card {
    padding: 40px 36px;
  }

  [data-section04-links] .s04-visual {
    height: 290px;
    min-height: 290px;
    flex-basis: 290px;
  }

  [data-section04-links] .s04-visual.s04-filters-visual {
    height: 320px;
    min-height: 320px;
    flex-basis: 320px;
  }

  [data-section04-links] .s04-major-card.s04-standard-card {
    gap: 10px;
  }

  [data-section04-links] .s04-standard-stage {
    padding: 12px;
  }

  [data-section04-links] .s04-standard-core {
    min-width: min(350px, 100%);
    height: 62px;
    min-height: 62px;
    gap: 12px;
    padding: 13px 26px;
  }

  [data-section04-links] .s04-standard-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 14px;
  }

  [data-section04-links] .s04-standard-mark svg {
    width: 18px;
    height: 18px;
  }

  [data-section04-links] .s04-standard-source {
    min-width: min(238px, 100%);
    min-height: 34px;
    padding-right: 16px;
    padding-left: 16px;
    font-size: 14px;
  }

  [data-section04-links] .s04-standard-source svg {
    width: 18px;
    height: 18px;
  }

  [data-section04-links] .s04-standard-core strong {
    font-size: 18px;
    line-height: 24px;
  }

  [data-section04-links] .s04-standard-pill b {
    font-size: 17px;
    line-height: 24px;
  }

  [data-section04-links] .s04-standard-pill {
    min-width: min(202px, 100%);
    height: 42px;
    flex-basis: 42px;
    gap: 9px;
    padding: 7px 16px;
  }

  [data-section04-links] .s04-standard-pill svg {
    width: 21px;
    height: 21px;
  }

  [data-section04-links] .s04-major-card:first-child {
    padding: 56px 40px;
  }

  [data-section04-links] .s04-overview-metric b {
    display: inline;
  }

  [data-section04-links] .s04-custom-visual {
    padding-right: 32px;
    padding-left: 32px;
  }
}

@media (min-width: 768px) {
  [data-section04-links] {
    padding-top: 0;
    padding-bottom: 0;
  }

  [data-section04-links] .s04-major-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-section04-links] .s04-major-card {
    padding: 24px 40px 56px;
  }

  [data-section04-links] .s04-major-card.s04-filters-card {
    gap: 10px;
  }

  [data-section04-links] .s04-visual.s04-filters-visual {
    width: calc(100% + 80px);
    margin-right: -40px;
    margin-left: -40px;
  }

  [data-section04-links] .s04-filters-stage {
    padding: 56px 40px 0;
  }

  [data-section04-links] .s04-visual.s04-standard-visual {
    width: calc(100% + 80px);
    margin-right: -40px;
    margin-left: -40px;
    padding: 56px 40px 0;
  }

  [data-section04-links] .s04-standard-stage {
    max-width: 459px;
    height: 264px;
  }

  [data-section04-links] .s04-major-card:first-child {
    gap: 8px;
  }

  [data-section04-links] .s04-major-card:nth-child(-n + 2) .s04-major-copy {
    margin-top: 16px;
  }

  [data-section04-links] .s04-major-card:nth-child(2) {
    gap: 24px;
    padding-top: 56px;
  }

  [data-section04-links] .s04-major-card:nth-child(2) .s04-major-copy {
    margin-top: 0;
  }

  [data-section04-links] .s04-visual {
    min-height: 290px;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  [data-section04-links] .s04-custom-visual {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (min-width: 1024px) {
  [data-section04-links] .s04-compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  [data-section04-links] .s04-group-row em {
    display: inline-flex;
  }

  [data-section04-links] .s04-group-row-primary {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
}

[data-section04-links] .s04-overview-layer:hover {
  transform: translate3d(var(--s04-x), calc(var(--s04-y) - 15px), 0);
}

@media (hover: hover) and (pointer: fine) {
  [data-section04-links] .s04-standard-source:hover {
    color: #14532d;
  }

  [data-section04-links] .s04-overview-item:hover {
    transform: translateX(-2%);
  }

  [data-section04-links] .s04-overview-claim:hover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  [data-section04-links] .s04-group-row:hover {
    transform: translateX(-2%);
  }

  [data-section04-links] .s04-claim:hover {
    box-shadow: 0 1px 2px rgba(22, 101, 52, 0.08);
  }

  [data-section04-links] .s04-more:hover {
    background: #fafafa;
  }

  [data-section04-links] .s04-more:active {
    background: #f5f5f5;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-section04-links] *,
  [data-section04-links] *::before,
  [data-section04-links] *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  [data-section04-links] .s04-route-particle {
    display: none;
  }

  [data-section04-links] .s04-standard-track {
    animation: none !important;
    transform: translateY(0);
  }

  [data-section04-links] .s04-filter-run {
    animation: none;
  }
}
