/* ============================================================
   ARCSAFE CONTENT CONTRACTS
   contracts.css — docs.css와 함께 로드
   build/contracts.py의 BlockContract CSS 구현.
   ============================================================ */
@layer docs {

/* ── Decision Blocks ─────────────────────────────────────── */
.decision-block {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r-md);
  border-left: 4px solid;
  margin: var(--s5) 0;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.decision-block--acceptable {
  background: var(--status-free-bg);
  border-color: var(--status-free);
  color: #003d22;
}

.decision-block--caution {
  background: #fff8e1;
  border-color: #f0a500;
  color: #6b4200;
}

.decision-block--prohibited {
  background: var(--cat-ex-bg);
  border-color: var(--cat-ex);
  color: #6b0a00;
}

.decision-label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--s2);
}

.decision-body {
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ── Criterion Block ─────────────────────────────────────── */
.criterion-block {
  background: var(--off-white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--s5);
  margin: var(--s5) 0;
}

.criterion-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border-light);
}

.criterion-body {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.7;
}

/* ── Legal Disclaimer ────────────────────────────────────── */
/* identity.json mandatory_disclaimer 기준 — LEGAL category 필수 */
.legal-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  margin: var(--s8) 0 var(--s4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-disclaimer::before {
  content: "⚖️";
  font-size: var(--text-lg);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

/* ── Table Scroll Wrapper ────────────────────────────────── */
/* contracts.py: table requires wrapper */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--s6);
  /* subtle scroll indicator on mobile */
  position: relative;
}

/* Fade indicator when content overflows */
@media (max-width: 767px) {
  .table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,.8));
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--t-base);
  }
  .table-scroll-wrapper.has-overflow::after {
    opacity: 1;
  }
}

/* ── Related Tool Card (inline) ──────────────────────────── */
/* renderer.py resolve_tool_stubs 결과 스타일 */
a.tool-card[style*="margin"] {
  max-width: 360px;
}

/* ── Code Block — mobile safe ────────────────────────────── */
pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--navy-deep);
  border-radius: var(--r-md);
  padding: var(--s5);
  margin-bottom: var(--s5);
  font-size: var(--text-sm);
  line-height: 1.6;
}

pre code {
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

} /* end @layer docs */
