/* ==========================================================================
   components.css — 按钮 / 卡片 / 封面 / 表格 / 手风琴 / 步骤 / 徽标
   ========================================================================== */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}
.btn--primary:hover {
  background: var(--brand-deep);
  box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--brand) 90%, transparent);
}

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

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

.btn--sm { padding: 9px 18px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* 文字箭头链接 */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand);
}
.arrow-link svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- 徽标 / 标签 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--ink-2);
  background: var(--surface);
  white-space: nowrap;
}
.chip--brand {
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
  background: var(--brand-ghost);
  color: var(--brand);
  font-weight: 600;
}
.chip--accent {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  display: inline-block;
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 3px;
}

/* 状态点 */
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

/* 版本/核对印章 */
.stamp-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: 6px 14px 6px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.stamp-line .mono { color: var(--ink-2); }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.card--flat { background: transparent; }
.card--pad-lg { padding: clamp(24px, 3vw, 40px); }
.card--hover:hover {
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: .08em;
  display: block;
  margin-bottom: var(--s-4);
}
.card__title { font-size: var(--fs-h3); margin-bottom: 10px; }
.card__text { color: var(--muted); font-size: var(--fs-sm); line-height: 1.76; }

/* 图标块 */
.icon-box {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-ghost);
  color: var(--brand);
  margin-bottom: var(--s-4);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}
.icon-box svg { width: 19px; height: 19px; }
.icon-box--accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ---------- 封面 ---------- */
.cover {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-deep);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 4;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease), filter .4s var(--ease);
  filter: saturate(.88) contrast(1.02);
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 10, 8, .52));
  opacity: .9;
  pointer-events: none;
}
.cover__label {
  position: absolute;
  left: 10px; right: 10px; bottom: 9px;
  z-index: 2;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
a.cover:hover img { transform: scale(1.045); filter: saturate(1) contrast(1.02); }

/* ---------- 字排书封（作品卡用） ---------- */
.cover--type {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 13px 15px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(158deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, .09);
  border: 0;
}
.cover--type::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 18% 6%, rgba(255, 255, 255, .16), transparent 62%),
    linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .22) 100%);
  pointer-events: none;
}
.cover--type .ct-genre {
  position: absolute;
  top: 13px;
  left: 13px;
  font-size: 10px;
  letter-spacing: .2em;
  opacity: .72;
  z-index: 1;
}
.cover--type .ct-mark {
  position: absolute;
  right: -12px;
  top: 14%;
  font-size: 112px;
  font-weight: 900;
  line-height: 1;
  opacity: .11;
  z-index: 0;
  letter-spacing: -.06em;
  pointer-events: none;
}
.cover--type .ct-title {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.44;
  letter-spacing: -.012em;
  padding-top: 12px;
  text-wrap: balance;
}
.cover--type .ct-rule {
  position: relative;
  z-index: 1;
  height: 1px;
  background: currentColor;
  opacity: .28;
  margin-top: auto;
}

/* 题材配色 */
.tint-romance { --c1: #7b2f45; --c2: #25101a; }
.tint-school  { --c1: #2f4a6b; --c2: #0f1622; }
.tint-fantasy { --c1: #2a4c3b; --c2: #0b1712; }
.tint-thriller{ --c1: #23262c; --c2: #060708; }
.tint-action  { --c1: #6d2f1c; --c2: #180a05; }
.tint-healing { --c1: #8a6234; --c2: #21150a; }

/* 同一题材内做细微变化，避免整排一模一样 */
.work:nth-child(3n+2) .cover--type {
  background: linear-gradient(174deg, var(--c1) 0%, var(--c2) 100%);
  filter: saturate(1.06) brightness(1.06);
}
.work:nth-child(3n) .cover--type {
  background: linear-gradient(138deg, var(--c1) 0%, var(--c2) 100%);
  filter: brightness(.9);
}

/* 封面墙（斜置叠放） */
.cover-stack {
  position: relative;
  height: 100%;
  min-height: 380px;
}
.cover-stack__item {
  position: absolute;
  width: 47%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .6s var(--ease);
}
.cover-stack__item img { width: 100%; height: 100%; object-fit: cover; }
.cover-stack__item:nth-child(1) {
  left: 2%; top: 8%;
  transform: rotate(-9deg);
  z-index: 1;
  aspect-ratio: 3/4;
}
.cover-stack__item:nth-child(2) {
  left: 26%; top: 0;
  transform: rotate(-1.5deg);
  z-index: 3;
  aspect-ratio: 3/4;
  width: 50%;
}
.cover-stack__item:nth-child(3) {
  right: 0; top: 16%;
  transform: rotate(8deg);
  z-index: 2;
  aspect-ratio: 3/4;
}
.cover-stack:hover .cover-stack__item:nth-child(1) { transform: rotate(-11deg) translateY(-6px); }
.cover-stack:hover .cover-stack__item:nth-child(3) { transform: rotate(10deg) translateY(-6px); }

/* 悬浮小卡 */
.float-card {
  position: absolute;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  backdrop-filter: blur(6px);
}
.float-card strong { display: block; font-size: var(--fs-sm); letter-spacing: -.01em; }
.float-card span { color: var(--muted); }

/* ---------- 数据条 ---------- */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: var(--s-5) var(--s-4);
  border-right: 1px solid var(--line-soft);
  text-align: center;
}
.stat:last-child { border-right: 0; }
.stat__num {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  display: block;
}
.stat__num sup {
  font-size: .45em;
  vertical-align: super;
  color: var(--accent);
  margin-left: 2px;
  font-family: var(--font-sans);
  font-weight: 700;
}
.stat__label {
  display: block;
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: .04em;
}
@media (max-width: 640px) {
  .stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 520px;
}
table.data caption {
  text-align: left;
  padding: 14px 18px;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  letter-spacing: .02em;
}
table.data th {
  text-align: left;
  font-size: var(--fs-micro);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--ink-2);
  line-height: 1.65;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
table.data td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
table.data .ok { color: var(--brand); font-weight: 700; }
table.data .no { color: var(--accent); font-weight: 700; }
table.data .warn { color: var(--gold); font-weight: 700; }

/* ---------- 手风琴 ---------- */
.acc {
  border-top: 1px solid var(--line);
}
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  text-align: left;
  padding: 22px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.008em;
  line-height: 1.5;
}
.acc__btn:hover { color: var(--brand); }
.acc__q { flex: 1; }
.acc__sign {
  position: relative;
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 4px;
}
.acc__sign::before,
.acc__sign::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.acc__sign::before { left: 0; top: 7px; width: 16px; height: 1.5px; }
.acc__sign::after { left: 7px; top: 0; width: 1.5px; height: 16px; }
.acc__btn[aria-expanded="true"] .acc__sign::after { transform: rotate(90deg); opacity: 0; }
.acc__btn[aria-expanded="true"] { color: var(--brand); }

.acc__panel {
  overflow: hidden;
  height: 0;
  transition: height .34s var(--ease);
}
.acc__inner {
  padding: 0 40px 24px 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.8;
}
.acc__inner p { margin-bottom: .8em; }
.acc__inner p:last-child { margin-bottom: 0; }

/* ---------- 步骤 ---------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: var(--s-5);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; }
.step__num {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--brand);
  opacity: .92;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.step__body h3 { margin-bottom: 12px; }
.step__body p { color: var(--muted); font-size: var(--fs-sm); }

.step__meta {
  display: grid;
  gap: 8px;
  margin-top: var(--s-4);
}
.step__meta div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: var(--s-3);
  font-size: var(--fs-sm);
  line-height: 1.7;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.step__meta dt,
.step__meta span:first-child {
  color: var(--muted-2);
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  padding-top: 2px;
}
.step__meta .pass { color: var(--brand); }
.step__meta .trap { color: var(--accent); }

@media (max-width: 640px) {
  .step { grid-template-columns: 1fr; gap: var(--s-2); }
  .step__num { font-size: 1.5rem; }
}

/* ---------- 提示块 ---------- */
.notice {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--ink-2);
}
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.notice--brand svg { color: var(--brand); }
.notice strong { color: var(--ink); }
.notice p { margin: 0; }

/* ---------- 跑马灯 ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  background: var(--surface-alt);
}
.marquee__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-right: 18px;
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
}
.marquee span::after {
  content: "◦";
  color: var(--accent);
  font-size: .9em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 两栏图文 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}
.split--top { align-items: start; }
.split--wide-right { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
/* 网格项默认 min-width:auto，会被内部 min-width:520px 的表格撑开整页；
   归零后 table-wrap 的 overflow-x 才能生效，表格在卡片内横向滚动 */
.split > * { min-width: 0; }

/* 右栏正文与左栏标题对齐（跳过小标签那一行） */
@media (min-width: 881px) {
  .split__offset { padding-top: 44px; }
}
@media (max-width: 880px) {
  .split, .split--wide-right { grid-template-columns: 1fr; }
}

/* 数字列表 */
.numlist { counter-reset: n; }
.numlist li {
  position: relative;
  padding: var(--s-4) 0 var(--s-4) 44px;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: 1.75;
}
.numlist li::before {
  counter-increment: n;
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--s-4);
  font-family: var(--font-serif);
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: .06em;
}
.numlist strong { display: block; color: var(--ink); margin-bottom: 2px; }
