/* ==========================================================================
   CPI Article Styles — Loaded only for posts imported by GSheet Post Importer Pro
   ========================================================================== */

/* ---------- Screen-reader only (accessibility) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- Citation links (superscript references) ---------- */
sup a {
  font-size: 0.75em;
  text-decoration: none;
  color: #0066cc;
  font-weight: 600;
  padding: 0 2px;
  transition: color 0.2s ease;
}
sup a:hover {
  text-decoration: underline;
  color: #004499;
}

/* ---------- Quick Answer Box ---------- */
.quick-answer {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-left: 5px solid #4caf50;
  padding: 1.5em;
  margin: 1.5em 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.quick-answer h2 {
  margin: 0 0 12px 0;
  font-size: 1.25em;
  font-weight: 700;
  color: #2e7d32;
}
.quick-answer ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  list-style: none;
}
.quick-answer li {
  margin: 6px 0;
  position: relative;
  padding-left: 24px;
  line-height: 1.6;
}
.quick-answer li::before {
  content: "\2713"; /* ✓ */
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 1.1em;
  color: #4caf50;
}
.quick-answer strong {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #4caf50;
  text-underline-offset: 2px;
}

/* ---------- Callout / Tip Box ---------- */
.callout-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}
.callout-box p {
  margin: 0;
  line-height: 1.6;
}
.callout-box strong {
  color: #d97706;
  font-weight: 700;
}

/* ---------- Table of Contents (nav) ---------- */
article nav[aria-labelledby] {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.2em 1.5em;
  margin: 1.5em 0;
}
article nav[aria-labelledby] > h2 {
  margin: 0 0 0.8em 0;
  font-size: 1.1em;
  font-weight: 700;
  color: #334155;
}
article nav[aria-labelledby] ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
article nav[aria-labelledby] ul ul {
  margin-top: 4px;
}
article nav[aria-labelledby] li {
  margin: 4px 0;
  line-height: 1.5;
}
article nav[aria-labelledby] li::before {
  content: "›";
  margin-right: 6px;
  color: #94a3b8;
  font-weight: 700;
}
article nav[aria-labelledby] a {
  text-decoration: none;
  color: #0066cc;
  font-weight: 500;
}
article nav[aria-labelledby] a:hover {
  text-decoration: underline;
  color: #004499;
}

/* ---------- Tables ---------- */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  min-width: 600px;
  font-size: 0.95em;
}
article table caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  padding: 8px 0;
  color: #334155;
}
article table th,
article table td {
  border: 1px solid #ddd;
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}
article table thead th {
  background-color: #f4f4f4;
  font-weight: bold;
  color: #1e293b;
}
article table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
article table tbody tr:hover {
  background-color: #f0f0f0;
}

/* Scrollable table wrapper */
div[style*="overflow-x"] {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 20px 0;
}

/* ---------- FAQ Section ---------- */
.faq-item {
  margin: 16px 0;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-item h3 {
  margin: 0 0 8px 0;
  font-size: 1.05em;
  font-weight: 600;
  color: #1e293b;
}
.faq-item p {
  margin: 0;
  line-height: 1.7;
  color: #475569;
}

/* ---------- Article body typography ---------- */
article p {
  line-height: 1.7;
  margin-bottom: 1em;
}
article h2 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-weight: 700;
  color: #1e293b;
}
article h3 {
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: #334155;
}
article ul[role="list"] {
  padding-left: 20px;
  margin: 16px 0;
}
article ul[role="list"] li {
  margin: 8px 0;
  line-height: 1.6;
}
article ul[role="list"] li strong {
  color: #1e293b;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 768px) {
  article table {
    font-size: 13px;
  }
  article table th,
  article table td {
    padding: 8px 4px;
    white-space: normal;
    word-break: break-word;
  }

  .quick-answer {
    padding: 16px 18px;
  }
  .quick-answer h2 {
    font-size: 1.1em;
  }

  .callout-box {
    padding: 14px 16px;
  }

  article nav[aria-labelledby] {
    padding: 1em;
  }

  .faq-item {
    padding: 12px 0;
  }
}