/* ============================================
   ISO 21434 V 模型 · 几何 V 形信息图
   ============================================ */
.capabilities {
  background: var(--bg-base);
}

.vmodel-intro {
  max-width: 720px;
  margin: 16px auto 0;
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.vmodel-stage {
  margin-top: 40px;
  padding: 28px 24px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #061f25 0%, #094b58 42%, #052e36 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

[data-theme="light"] .vmodel-stage {
  background: linear-gradient(165deg, #dceef0 0%, #e8f5f6 50%, #d4e8eb 100%);
}

.vmodel-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
  align-items: start;
}

.vmodel-main {
  min-width: 0;
}

.vmodel-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .vmodel-band {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border);
}

.vmodel-band--csms { margin-bottom: 16px; }
.vmodel-band--ops { margin-top: 16px; }

.vmodel-band__tag {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .vmodel-band__tag { color: var(--text-muted); }

.vmodel-band__title {
  font-size: 14px;
  font-weight: 600;
  color: #eef6f8;
}

[data-theme="light"] .vmodel-band__title { color: var(--text-primary); }

/* V 形画布 */
.vmodel-canvas {
  position: relative;
  padding: 4px 0 0;
  min-height: 640px;
}

.vmodel-vshape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.vmodel-vshape__fill {
  fill: rgba(255, 255, 255, 0.04);
}

.vmodel-vshape__stroke {
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.vmodel-vshape__arm {
  stroke: rgba(0, 204, 197, 0.55);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.vmodel-vshape__spine {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
  stroke-dasharray: 5 7;
  vector-effect: non-scaling-stroke;
}

[data-theme="light"] .vmodel-vshape__fill { fill: rgba(0, 122, 125, 0.05); }
[data-theme="light"] .vmodel-vshape__stroke { stroke: rgba(9, 75, 88, 0.25); }
[data-theme="light"] .vmodel-vshape__arm { stroke: rgba(0, 122, 125, 0.4); }

.vmodel-vlabels {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 6%;
  pointer-events: none;
  z-index: 1;
}

.vmodel-vlabels span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

[data-theme="light"] .vmodel-vlabels span { color: rgba(9, 75, 88, 0.5); }

/* 12 列 V 形网格 — 顶部宽、底部收窄 */
.vmodel-tiers {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vmodel-tier {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: stretch;
}

/* 顶部最宽 */
.vmodel-tier--outer[data-level="1"] .vmodel-tier__arm--left { grid-column: 1 / 4; }
.vmodel-tier--outer[data-level="1"] .vmodel-tier__arm--right { grid-column: 10 / 13; }

.vmodel-tier--outer[data-level="2"] .vmodel-tier__arm--left { grid-column: 1 / 5; }
.vmodel-tier--outer[data-level="2"] .vmodel-tier__arm--right { grid-column: 9 / 13; }

.vmodel-tier--outer[data-level="3"] .vmodel-tier__arm--left { grid-column: 1 / 6; }
.vmodel-tier--outer[data-level="3"] .vmodel-tier__arm--right { grid-column: 8 / 13; }

.vmodel-tier--outer[data-level="4"] .vmodel-tier__arm--left { grid-column: 1 / 7; }
.vmodel-tier--outer[data-level="4"] .vmodel-tier__arm--right { grid-column: 7 / 13; }

.vmodel-tier--outer[data-level="5"] .vmodel-tier__arm--left { grid-column: 2 / 7; }
.vmodel-tier--outer[data-level="5"] .vmodel-tier__arm--right { grid-column: 7 / 12; }

/* 底部 V 尖 */
.vmodel-tier--tip .vmodel-tier__arm--left { grid-column: 4 / 7; }
.vmodel-tier--tip .vmodel-tier__arm--right { grid-column: 7 / 10; }

/* 内层白卡 — 嵌在 V 形内部 */
.vmodel-tier--inner .vmodel-card--left { grid-column: 4 / 6; }
.vmodel-tier--inner .vmodel-tier__bridge { grid-column: 6 / 8; }
.vmodel-tier--inner .vmodel-card--right { grid-column: 8 / 10; }

.vmodel-tier--inner[data-inner="2"] .vmodel-card--left { grid-column: 4 / 6; }
.vmodel-tier--inner[data-inner="2"] .vmodel-card--right { grid-column: 8 / 10; }

.vmodel-tier--inner[data-inner="3"] .vmodel-card--left { grid-column: 5 / 7; }
.vmodel-tier--inner[data-inner="3"] .vmodel-card--right { grid-column: 7 / 9; }
.vmodel-tier--inner[data-inner="3"] .vmodel-tier__bridge { grid-column: 6 / 8; }

.vmodel-tier__bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.vmodel-tier__bridge-line {
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 204, 197, 0.2), rgba(0, 204, 197, 0.6), rgba(0, 204, 197, 0.2));
  border-radius: 2px;
}

/* 梯形卡片 */
.vmodel-card {
  height: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vmodel-card:hover {
  transform: translateY(-1px);
  z-index: 3;
}

.vmodel-card--phase {
  background: linear-gradient(155deg, #6b5ce7 0%, #5546c4 45%, #4a3daf 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 14px rgba(74, 61, 175, 0.35);
}

.vmodel-card--phase.vmodel-card--left {
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  padding-right: 16px;
}

.vmodel-card--phase.vmodel-card--right {
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  padding-left: 16px;
}

.vmodel-tier--outer[data-level="1"] .vmodel-card--left { clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); }
.vmodel-tier--outer[data-level="1"] .vmodel-card--right { clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); }
.vmodel-tier--outer[data-level="2"] .vmodel-card--left { clip-path: polygon(0 0, 100% 0, 84% 100%, 0 100%); }
.vmodel-tier--outer[data-level="2"] .vmodel-card--right { clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); }
.vmodel-tier--outer[data-level="3"] .vmodel-card--left { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.vmodel-tier--outer[data-level="3"] .vmodel-card--right { clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); }
.vmodel-tier--outer[data-level="4"] .vmodel-card--left,
.vmodel-tier--outer[data-level="5"] .vmodel-card--left { clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%); }
.vmodel-tier--outer[data-level="4"] .vmodel-card--right,
.vmodel-tier--outer[data-level="5"] .vmodel-card--right { clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%); }
.vmodel-tier--tip .vmodel-card--left { clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%); }
.vmodel-tier--tip .vmodel-card--right { clip-path: polygon(5% 0, 100% 0, 100% 100%, 0 100%); }

.vmodel-card--spec {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  text-align: center;
  padding: 10px 12px;
}

.vmodel-card__en {
  margin: 0 0 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-transform: uppercase;
}

.vmodel-card--phase .vmodel-card__en { color: rgba(255, 255, 255, 0.58); }
.vmodel-card--spec .vmodel-card__en { color: #64748b; }

.vmodel-card__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.vmodel-card--phase .vmodel-card__title { color: #fff; }
.vmodel-card--spec .vmodel-card__title { color: #1e293b; margin-bottom: 0; font-size: 11px; }

.vmodel-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vmodel-tier__bridge .vmodel-chips { justify-content: center; }

.vmodel-chip {
  display: inline-flex;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  white-space: nowrap;
}

.vmodel-chip--service {
  background: rgba(234, 136, 58, 0.9);
  border-color: rgba(234, 136, 58, 1);
}

.vmodel-tier__bridge .vmodel-chip {
  color: var(--brand-deep);
  background: rgba(0, 166, 169, 0.12);
  border-color: rgba(0, 166, 169, 0.25);
  font-size: 9px;
}

.vmodel-tier__bridge .vmodel-chip--service {
  color: #9a4a12;
  background: rgba(234, 136, 58, 0.14);
  border-color: rgba(234, 136, 58, 0.3);
}

.vmodel-band .vmodel-chip {
  color: #eef6f8;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .vmodel-band .vmodel-chip {
  color: var(--text-primary);
  background: var(--bg-base);
  border-color: var(--border);
}

.vmodel-apex {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
  padding: 8px;
  text-align: center;
}

.vmodel-apex strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 204, 197, 0.85);
}

.vmodel-apex span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .vmodel-apex strong { color: var(--brand-primary); }
[data-theme="light"] .vmodel-apex span { color: var(--text-muted); }

.vmodel-side {
  padding: 20px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .vmodel-side {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--border);
}

.vmodel-side__head h3 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
  color: #eef6f8;
}

[data-theme="light"] .vmodel-side__head h3 { color: var(--text-primary); }

.vmodel-side__head p {
  margin: 0 0 16px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .vmodel-side__head p { color: var(--text-muted); }

.vmodel-side__list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.vmodel-side__list li {
  position: relative;
  padding: 8px 0 8px 13px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(238, 246, 248, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .vmodel-side__list li {
  color: var(--text-secondary);
  border-bottom-color: var(--border);
}

.vmodel-side__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-light);
}

.vmodel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .vmodel-legend { color: var(--text-muted); }

.vmodel-legend span { display: inline-flex; align-items: center; gap: 5px; }

.vmodel-legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.vmodel-legend__dot--product { background: var(--brand-light); }
.vmodel-legend__dot--service { background: #e8883a; }

@media (max-width: 1180px) {
  .vmodel-shell { grid-template-columns: 1fr; }
  .vmodel-side { order: -1; }
  .vmodel-side__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }
}

@media (max-width: 820px) {
  .vmodel-stage { padding: 16px 12px 20px; }
  .vmodel-canvas { min-height: auto; }
  .vmodel-vshape, .vmodel-vlabels { display: none; }

  .vmodel-tier {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .vmodel-tier__arm,
  .vmodel-tier--inner .vmodel-card,
  .vmodel-tier--inner .vmodel-tier__bridge {
    grid-column: auto !important;
    width: 100%;
  }

  .vmodel-card--phase.vmodel-card--left,
  .vmodel-card--phase.vmodel-card--right {
    clip-path: none;
    padding: 12px 14px;
  }

  .vmodel-side__list { grid-template-columns: 1fr; }
  .vmodel-chip { white-space: normal; }
}
