/* ══ ACG IIS — Credentials & Compliance pages ════════════════════════════════ */

.section-xdk { background: var(--slate-xdk); color: var(--white); }

/* ── Credentials hub grid ────────────────────────────────────────────────── */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cred-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .2s;
  text-decoration: none;
}
.cred-card:hover { border-color: var(--gold); box-shadow: 0 4px 20px rgba(200,150,12,0.12); }
.cred-card-ref {
  font-size: 11px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.cred-card-icon {
  width: 44px; height: 44px;
  background: rgba(200,150,12,0.10); border: 1px solid rgba(200,150,12,0.20);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.cred-card-icon i { color: var(--gold); font-size: 18px; }
.cred-card h3 {
  font-family: var(--font-sans); font-size: 15px; font-weight: 700;
  color: var(--slate-dk); margin-bottom: 8px;
}
.cred-card p {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  flex: 1; margin-bottom: 20px; max-width: none;
}
.cred-card-footer {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule);
}
.cred-dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; text-decoration: none; transition: all .2s;
}
.cred-dl-btn-primary  { background: var(--gold); color: var(--slate-xdk); }
.cred-dl-btn-primary:hover  { background: var(--gold-dk); }
.cred-dl-btn-outline  { background: transparent; color: var(--slate-dk); border: 1px solid var(--rule); }
.cred-dl-btn-outline:hover  { border-color: var(--gold); color: var(--gold); }

/* ── Capability section anchors ──────────────────────────────────────────── */
.cred-cap-section { scroll-margin-top: 110px; }

/* ── Policy page layout ──────────────────────────────────────────────────── */
.cred-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* ── Policy content ──────────────────────────────────────────────────────── */
.policy-body { min-width: 0; }
.policy-section-header {
  background: var(--slate-dk); color: var(--gold);
  padding: 10px 16px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin: 32px 0 16px; border-left: 4px solid var(--gold);
}
.policy-sub { font-size: 15px; font-weight: 700; color: var(--slate-dk); margin: 20px 0 8px; }
.policy-p {
  font-size: 14.5px; color: var(--text); line-height: 1.75;
  margin-bottom: 12px; max-width: none; text-align: justify;
}
.policy-ul { list-style: none; padding: 0; margin: 12px 0 16px; }
.policy-ul li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--text); line-height: 1.65; padding: 4px 0;
}
.policy-ul li::before {
  content: ''; width: 6px; height: 6px; min-width: 6px;
  background: var(--gold); border-radius: 50%; margin-top: 8px;
}
.policy-ol { list-style: none; padding: 0; margin: 12px 0 16px; counter-reset: policy-counter; }
.policy-ol li {
  display: flex; gap: 12px; font-size: 14px; color: var(--text);
  line-height: 1.65; padding: 4px 0; counter-increment: policy-counter;
}
.policy-ol li::before {
  content: counter(policy-counter) '.';
  color: var(--gold); font-weight: 700; min-width: 20px; flex-shrink: 0;
}

/* ── Policy table ────────────────────────────────────────────────────────── */
.policy-table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 13.5px;
}
.policy-table th {
  background: var(--slate-dk); color: var(--white);
  padding: 10px 14px; text-align: left; font-weight: 700; font-size: 13px;
}
.policy-table td {
  padding: 10px 14px; border: 1px solid var(--rule);
  color: var(--text); vertical-align: top; line-height: 1.55;
}
.policy-table tr:nth-child(even) td { background: var(--bg); }
.policy-table td:first-child { font-weight: 600; color: var(--slate-dk); }

/* ── Download bar ────────────────────────────────────────────────────────── */
.cred-dl-bar {
  background: var(--slate-dk); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 32px;
}
.cred-dl-bar h4 {
  font-family: var(--font-sans); font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.50); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 16px;
}
.cred-dl-bar-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Doc metadata strip ──────────────────────────────────────────────────── */
.policy-meta-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 32px;
}
.policy-meta-item {
  flex: 1; min-width: 140px; padding: 14px 18px;
  border-right: 1px solid var(--rule);
}
.policy-meta-item:last-child { border-right: none; }
.policy-meta-label {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.policy-meta-value { font-size: 13px; font-weight: 600; color: var(--slate-dk); }

/* ── Hero row ────────────────────────────────────────────────────────────── */
.cred-hero-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cred-hero-btn-group { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* ── Signature / footer block ────────────────────────────────────────────── */
.cred-sig-block {
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 24px; margin-top: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}

/* ── Commitment banner ───────────────────────────────────────────────────── */
.commitment-banner {
  background: rgba(200,150,12,0.06);
  border: 1px solid rgba(200,150,12,0.25);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin-bottom: 28px;
  font-size: 13.5px; color: var(--text); line-height: 1.6;
}
.commitment-banner strong { color: var(--slate-dk); }

/* ── Sidebar (desktop only) ──────────────────────────────────────────────── */
.cred-sidebar { position: sticky; top: 96px; }
.cred-sidebar-card {
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px;
}
.cred-sidebar-card h4 {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.cred-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius);
  font-size: 13px; color: var(--text); text-decoration: none;
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.cred-nav-link:hover { background: var(--white); color: var(--gold); }
.cred-nav-link.active {
  background: var(--white); color: var(--gold);
  font-weight: 600; border-left: 2px solid var(--gold);
}
.cred-nav-link i { width: 16px; color: var(--gold); font-size: 12px; }

/* ── Mobile credential tab bar ───────────────────────────────────────────── */
.cred-mobile-nav {
  display: none;
  position: sticky;
  top: 68px;
  z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.cmn-scroll {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 40px;
}
.cmn-scroll::-webkit-scrollbar { display: none; }
.cmn-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 14px; white-space: nowrap; flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: var(--text);
  text-decoration: none; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.cmn-tab i { color: var(--gold); font-size: 11px; }
.cmn-tab:hover { color: var(--gold); }
.cmn-tab.active { color: var(--gold); font-weight: 700; border-bottom-color: var(--gold); }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — all breakpoints below, after all base rules
   ══════════════════════════════════════════════════════════════════════════ */

@media(max-width:960px) {
  .cred-grid { grid-template-columns: 1fr 1fr; }
  /* Layout: single column, sidebar hidden (mobile nav takes over) */
  .cred-layout { grid-template-columns: 1fr; gap: 0; }
  .cred-sidebar { display: none; }
  /* Show mobile tab bar */
  .cred-mobile-nav { display: block; }
  .cmn-scroll { padding: 0 24px; }
}

@media(max-width:768px) {
  /* Left-align body text — justify gaps are ugly at narrow widths */
  .policy-p { text-align: left; }

  /* Meta strip → 2-column grid */
  .policy-meta-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .policy-meta-item {
    flex: unset; min-width: auto;
    border-right: none; border-bottom: 1px solid var(--rule);
  }
  .policy-meta-item:last-child { border-bottom: none; }
  .policy-meta-item:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* Download bar buttons stack */
  .cred-dl-bar-btns { flex-direction: column; }
  .cred-dl-bar-btns .btn { width: 100%; justify-content: center; }

  /* Capability section scroll offset (navbar 68px + tab bar ~46px) */
  .cred-cap-section { scroll-margin-top: 130px; }
}

@media(max-width:640px) {
  .cred-grid { grid-template-columns: 1fr; }

  /* Hero row: stack title and download button */
  .cred-hero-row { flex-direction: column; gap: 16px; }
  .cred-hero-row > a.btn { width: 100%; justify-content: center; }
  .cred-hero-btn-group { width: 100%; flex-direction: column; }
  .cred-hero-btn-group .btn { width: 100%; justify-content: center; }

  /* Signature block: single column */
  .cred-sig-block { grid-template-columns: 1fr; }

  /* ── Tables → card layout ─────────────────────────────────────────────── */
  /* Make every table element block so rows become cards */
  .policy-table,
  .policy-table thead,
  .policy-table tbody,
  .policy-table tfoot,
  .policy-table tr,
  .policy-table th,
  .policy-table td { display: block; width: 100%; box-sizing: border-box; }

  /* Header row hidden — the first td in each row acts as the label */
  .policy-table thead { display: none; }

  /* Each row = a card */
  .policy-table tr {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--white);
  }

  /* Cells */
  .policy-table td {
    border: none;
    border-bottom: 1px solid var(--rule);
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.55;
  }
  .policy-table td:last-child { border-bottom: none; }

  /* First cell = card "header" (framework name, phase number, standard) */
  .policy-table td:first-child {
    background: var(--slate-dk);
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 14px;
  }

  /* Reset even-row shading since cards replace it */
  .policy-table tr:nth-child(even) td { background: var(--white); }
  .policy-table tr:nth-child(even) td:first-child { background: var(--slate-dk); }
}

@media(max-width:480px) {
  .cmn-scroll { padding: 0 16px; }
}
