/* ================================
   PFIC User Guide — Page-Specific Layout
   ================================ */

/* Base inherits from articles.css */

/* --------------------------------
   Two-column layout for examples
   -------------------------------- */
.pfic-two-col {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Left column (text) */
.pfic-col-left {
  flex: 1;
  min-width: 280px;
}

/* Right column (image preview) */
.pfic-col-right {
  flex: 0 0 auto;
  max-width: 420px;   /* 🔥 右栏最大宽度（你可以调成 360–420 之间） */
  min-width: 280px;
  display: flex;
  justify-content: flex-end;
}

/* Image scaling + styling */
.pfic-img-preview {
  width: 100%;          /* 🔥 图片填满右栏（但不会放大） */
  max-width: 100%;      /* 不超过右栏 */
  height: auto;
  object-fit: contain;  /* 避免拉伸 */
  image-rendering: -webkit-optimize-contrast; /* 提升清晰度 */
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px;
  background: #fafafa;
}

/* Optional center alignment for captions */
.pfic-img-caption {
  text-align: center;
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

/* --------------------------------
   Responsive for mobile
   -------------------------------- */
@media (max-width: 768px) {
  .pfic-two-col {
    flex-direction: column;
  }
  .pfic-col-right {
    justify-content: center;
    margin-top: 12px;
  }
}

.pfic-red {
  color: #c00000;
  font-weight: 600;
}

.full-width-item {
  flex-basis: 100%;
  width: 100%;
}

ul {
  margin-top: 0;
}


.pfic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pfic-table th {
  background: #f7f7f7;
  font-weight: 700;
  border: 1px solid #ccc;
  padding: 6px;
  text-align: left;
}

.pfic-table td {
  border: 1px solid #ccc;
  padding: 6px;
}

/* 斑马线 */
.pfic-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* 负数红色（自动判断，不需要 class="neg"） */
.pfic-table td {
  color: inherit;
}

.pfic-table td:has(> span.neg),
.pfic-table td.neg {
  color: #c00000 !important;
  font-weight: 600;
}
