/* =======================================================================
 * compliance.css — styles for /compliance/ guide pages (loaded via
 * compliance/_render.php). Builds on the brand tokens in custom.css.
 * ===================================================================== */

/* The shared .checklist tick in custom.css has a mis-encoded glyph; restate
   it here with an escaped check mark so it renders correctly. */
.guide-body .checklist li::before{ content:"\2713"; }
.guide-body .checklist li{ margin-bottom:.7em; }

.cg-meta{ font-size:14px; color:#5b6573; margin-bottom:10px; }
.cg-disclaimer{ font-size:15px; line-height:1.6; }
.guide-body .toc a{ text-decoration:none; }
.guide-body .toc a:hover{ text-decoration:underline; }
.guide-body h2[id], .guide-body h3[id], #faq{ scroll-margin-top:100px; }

/* Simple data tables inside guides (SAQ types, who-it-applies-to). */
.cg-table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 0 1.5em; border:1px solid var(--pit-border); border-radius:10px; }
.cg-table{ width:100%; border-collapse:collapse; font-size:15px; line-height:1.5; }
/* Wide (3+ column) tables keep a readable width and scroll on tablets... */
.cg-table-stack{ min-width:560px; }
.cg-table th, .cg-table td{ text-align:left; vertical-align:top; padding:10px 14px; border-bottom:1px solid var(--pit-border); }
.cg-table td:first-child strong{ white-space:nowrap; }
.cg-table thead th{ background:var(--pit-surface); color:var(--pit-anchor); font-weight:700; }
.cg-table tbody tr:last-child td{ border-bottom:0; }

/* ...and on phones each row becomes a card with the column name beside each value. */
@media (max-width:575.98px){
  .cg-table-wrap:has(.cg-table-stack){ overflow:visible; border:0; border-radius:0; }
  .cg-table-stack{ min-width:0; }
  .cg-table-stack thead{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .cg-table-stack, .cg-table-stack tbody, .cg-table-stack tr, .cg-table-stack td{ display:block; width:100%; }
  .cg-table-stack tr{ border:1px solid var(--pit-border); border-radius:10px; margin:0 0 12px; background:#fff; overflow:hidden; }
  .cg-table-stack td{ border-bottom:1px solid var(--pit-border); padding:8px 14px; }
  .cg-table-stack tr td:last-child{ border-bottom:0; }
  .cg-table-stack td:first-child{ background:var(--pit-surface); color:var(--pit-anchor); font-weight:700; }
  .cg-table-stack td:not(:first-child)[data-label]::before{ content:attr(data-label); display:block; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#5b6573; margin-bottom:2px; }
}

/* FAQ accordion */
.cg-faq{ max-width:820px; margin:0 auto; }
.cg-faq h2{ margin-bottom:22px; }
.cg-faq-item{ background:#fff; border:1px solid var(--pit-border); border-radius:10px; margin-bottom:12px; }
.cg-faq-item summary{ cursor:pointer; list-style:none; padding:16px 48px 16px 20px; font-weight:700; color:var(--pit-ink); position:relative; font-size:16px; line-height:1.45; }
.cg-faq-item summary::-webkit-details-marker{ display:none; }
.cg-faq-item summary::after{ content:"+"; position:absolute; right:20px; top:50%; transform:translateY(-50%); font-size:22px; color:var(--pit-primary); font-weight:400; }
.cg-faq-item[open] summary::after{ content:"\2212"; }
.cg-faq-item summary:focus-visible{ outline:3px solid var(--pit-accent); outline-offset:2px; border-radius:10px; }
.cg-faq-answer{ padding:0 20px 18px; color:#2b3240; font-size:16px; line-height:1.7; }
.cg-faq-answer p:last-child{ margin-bottom:0; }
.cg-faq-answer a{ color:var(--pit-primary); text-decoration:underline; }

/* CTA */
.cg-cta-buttons{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.post-cta .cg-cta-buttons .btn{ margin:0; }
.post-cta .cg-cta-note{ margin:16px 0 0; font-size:14px; }
.post-cta .cg-cta-note a{ color:#fff; text-decoration:underline; }

/* Hub page */
.cg-hub-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr)); gap:24px; }
.cg-hub-grid .hub-card{ height:100%; display:flex; flex-direction:column; }
.cg-hub-grid .hub-card .hub-count{ margin-top:auto; padding-top:12px; }
.cg-who{ list-style:none; margin:10px 0 0; padding:0; font-size:14px; color:#5b6573; }
.cg-who li{ padding-left:16px; position:relative; margin-bottom:4px; }
.cg-who li::before{ content:"\2022"; position:absolute; left:2px; color:var(--pit-accent); font-weight:700; }
.cg-yes{ color:var(--pit-pass-ink,#16733f); font-weight:700; }
.cg-maybe{ color:var(--pit-warn-ink,#8A5300); font-weight:700; }

@media (max-width:767.98px){
  .cg-faq-item summary{ font-size:15px; padding:14px 44px 14px 16px; }
  .cg-faq-answer{ padding:0 16px 16px; font-size:15px; }
  .cg-table{ font-size:14px; }
}
