/**
 * 成功案例归档页样式覆盖分片（仅归档，作用域 .opc-arc--case）。
 *
 * 注意：本文件在 single-opc_case 详情页也会被加载，因此所有规则一律以
 * .opc-arc 作用域限定，绝不影响详情页。详情页由主控范式A单独负责。
 *
 * 根因修复：prototype 的 .rich-row 依赖 margin:0 -14px / width:calc(100%+28px)，
 * 必须活在有 padding 的 .col-stack 竖列里；归档现已按原型改为左右两列结构，
 * 此处仅做间距与 rich-meta 宽度精修，消除文字换行与拥挤。
 */

/* ---- 顶部工具条：结果统计 + 投稿入口 ---- */
.opc-arc .view-toggle {
    gap: 16px;
    padding-bottom: 4px;
}
.opc-arc .result-summary {
    font-weight: 600;
    letter-spacing: .01em;
}
.opc-arc-submit {
    font-family: var(--font-display);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
    letter-spacing: .01em;
}

/* ---- 两列容器：加大列间距与中缝呼吸 ---- */
.opc-arc .two-col-wrap {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}
/* 归档页不需要基座 .case-two-col 的圆角方框+渐变背景，仅首页保留（作用域限定 .opc-arc，不影响 front-page.php） */
.opc-arc .two-col-wrap.case-two-col {
    border-radius: 0;
    border: none;
    overflow: visible;
    background: none;
}
.opc-arc .col-stack {
    padding: 0 34px;
}
.opc-arc .col-stack:first-child { padding-left: 2px; }
.opc-arc .col-stack:last-child  { padding-right: 2px; }

/* ---- 卡片行：更舒展的纵向节奏 ---- */
.opc-arc .rich-row {
    gap: 16px;
    padding: 22px 16px;
    margin: 0 -16px;
    width: calc(100% + 32px);
    height: auto;
    overflow: visible;
    border-radius: 14px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.opc-arc .col-stack .rich-row:last-child { border-bottom: none; }
.opc-arc .rich-row:hover {
    background: #fff;
    box-shadow: 0 10px 30px -14px rgba(29,29,31,.16);
    transform: translateY(-1px);
}
.opc-arc .rich-row:hover .rich-thumb {
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .18);
}

/* ---- 缩略图：略大更精致 ---- */
.opc-arc .rich-thumb {
    width: 104px;
    height: 78px;
    border-radius: 12px;
}
.opc-arc .rich-thumb .order-badge {
    top: 7px;
    left: 7px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* ---- 正文：标题、简介、标签 ---- */
.opc-arc .rich-body { gap: 7px; }
.opc-arc .rich-name-row { flex-wrap: wrap; gap: 8px; }
.opc-arc .rich-name {
    font-family: var(--font-display);
    font-size: 14.5px;
    line-height: 1.35;
}
.opc-arc .rich-batch {
    background: var(--surface);
    color: var(--muted);
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    font-size: 10.5px;
    line-height: 1.5;
}
.opc-arc .rich-desc { margin: 1px 0; }
.opc-arc .rich-tags { margin-top: 2px; gap: 8px; }
.opc-arc .rich-tags span { color: var(--muted-2); font-weight: 400; }

/* ---- 关键修复：放宽右侧 meta，消除 revenue/who 换行 ---- */
.opc-arc .rich-meta {
    width: 104px;
    gap: 7px;
    padding-left: 14px;
}
.opc-arc .rich-meta .who,
.opc-arc .rich-meta .revenue,
.opc-arc .rich-meta .rich-batch {
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.opc-arc .rich-meta .revenue {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 12.5px;
}

/* ---- 空状态 ---- */
.opc-arc-empty {
    text-align: center;
    padding: 48px 0;
    color: var(--muted);
    -webkit-line-clamp: unset;
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .opc-arc .col-stack { padding: 0 20px; }
    .opc-arc .rich-meta { width: 96px; }
}
@media (max-width: 768px) {
    .opc-arc .two-col-wrap { grid-template-columns: 1fr; }
    .opc-arc .two-col-wrap::after { display: none; }
    .opc-arc .col-stack,
    .opc-arc .col-stack:first-child,
    .opc-arc .col-stack:last-child { padding: 0; }
    /* 两列合并为单列时，为第二列首行补回上边框，避免衔接处缺线 */
    .opc-arc .col-stack:last-child .rich-row:first-child { border-top: 1px solid var(--line); }
    .opc-arc .rich-row { padding: 18px 14px; margin: 0 -14px; width: calc(100% + 28px); }
    .opc-arc .rich-thumb { width: 88px; height: 66px; }
}
@media (max-width: 460px) {
    .opc-arc .rich-row { gap: 12px; }
    .opc-arc .rich-thumb { width: 72px; height: 54px; }
    .opc-arc .rich-meta { width: 84px; padding-left: 8px; }
    .opc-arc-submit { display: none; }
}

/* ========== 2026-07-18：列表页 post-loop 精致设计（对齐资讯列表产品级质感）========== */
.opc-arc--case .post-loop.post-loop-default {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  align-items: start;
}
.opc-arc--case .post-loop-default .item {
  display: flex;
  gap: var(--space-4);
  padding: 22px 16px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 14px;
  align-items: flex-start;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.opc-arc--case .post-loop-default .item:hover {
  background: #fff;
  box-shadow: 0 10px 30px -14px rgba(29,29,31,.16);
  transform: translateY(-1px);
}
.opc-arc--case .post-loop-default .item.item-no-thumb { display: block; }

/* 缩略图 */
.opc-arc--case .post-loop-default .item-img {
  flex: 0 0 132px;
  width: 132px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin: 0;
}
.opc-arc--case .post-loop-default .item-img .item-img-inner,
.opc-arc--case .post-loop-default .item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}
.opc-arc--case .post-loop-default .item:hover .item-img {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .18);
}
/* 无封面占位缩略块：中性浅灰底 + 灰字（与 OPC资讯缩略图同尺寸，保证每个 item 都有图区） */
.opc-arc--case .post-loop-default .item-img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--entity-ph);
  color: var(--entity-ph-fg);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 12px;
  user-select: none;
}
.opc-arc--case .post-loop-default .item-content { 
  flex: 1 1 auto; 
  min-width: 0; 
  position: relative; 
}

/* 整卡可点 */
.opc-arc--case .post-loop-default .item-content .item-stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
}
.opc-arc--case .post-loop-default .item-content > *:not(.item-stretched-link) { 
  position: relative; 
  z-index: 2; 
}
.opc-arc--case .post-loop-default .item-content .item-title a,
.opc-arc--case .post-loop-default .item-content .item-meta a { 
  position: relative; 
  z-index: 2; 
}

/* 标题 / 摘要 */
.opc-arc--case .post-loop .item-title,
.opc-arc--case .post-loop .item-title a {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.opc-arc--case .post-loop .item-title a:hover { color: var(--accent); }
.opc-arc--case .post-loop .item-excerpt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-top: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 分类标签：纯文字叠在缩略图上 */
.opc-arc--case .post-loop .item-category {
  color: #fff;
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
  border-radius: 0;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 0 1px rgba(0,0,0,.4);
  position: absolute;
  top: 7px;
  left: 9px;
  z-index: 3;
}
.opc-arc--case .post-loop .item-category:hover { color: var(--accent-soft); }

/* meta 行 */
.opc-arc--case .post-loop .item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.opc-arc--case .post-loop .item-meta,
.opc-arc--case .post-loop .item-meta-li {
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 12px;
}
.opc-arc--case .post-loop .item-meta-li.verified.is-verified {
  color: var(--accent);
  font-weight: 500;
}
.opc-arc--case .post-loop .item-meta-right {
  margin-left: auto;
}

/* 响应式 */
@media (max-width: 900px) {
  .opc-arc--case .post-loop-default .item-img { 
    flex-basis: 116px; 
    width: 116px; 
    height: 82px; 
  }
}
@media (max-width: 768px) {
  .opc-arc--case .post-loop.post-loop-default { 
    grid-template-columns: 1fr; 
    gap: 0; 
  }
  .opc-arc--case .post-loop-default .item { padding: 18px 14px; }
  .opc-arc--case .post-loop .item-title,
  .opc-arc--case .post-loop .item-title a { font-size: 15px; }
}
@media (max-width: 460px) {
  .opc-arc--case .post-loop-default .item { gap: 12px; }
  .opc-arc--case .post-loop-default .item-img { 
    flex-basis: 96px; 
    width: 96px; 
    height: 70px; 
  }
}

/* ========== 2026-07-18d：meta 样式补充，完全对齐资讯列表 ========== */
.opc-arc--case .post-loop .item-meta a,
.opc-arc--case .post-loop .item-meta-li a {
  color: var(--muted-2);
  text-decoration: none;
  transition: color .2s ease;
}
.opc-arc--case .post-loop .item-meta-li a:hover { 
  color: var(--accent); 
}
