/* Dark theme article overrides */
[data-theme="dark"] .cq-article-inner {
  background: linear-gradient(180deg, var(--ac-surface) 0%, var(--ac-surface-2) 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--ac-border);
}
[data-theme="dark"] .cq-block,
[data-theme="dark"] .cq-hero {
  color: var(--ac-text);
}
[data-theme="dark"] .cq-prose p,
[data-theme="dark"] .cq-block-body {
  color: var(--ac-text-soft);
}

.cq-article {
  max-width: 820px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

@keyframes cqFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.cq-article-inner {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(26, 36, 32, 0.1), 0 0 0 1px rgba(105, 164, 129, 0.12);
  overflow: hidden;
}

/* Hard containment: prevent any block from leaking right side */
.cq-article-inner > * {
  position: relative;
  z-index: 1;
  max-width: 100%;
  clear: both;
}

.cq-article-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 400px at -10% -20%, rgba(105, 164, 129, 0.08), transparent 55%);
}

/* ── Hero ── */
.cq-hero {
  position: relative;
  padding: 2.25rem 2rem 1.75rem;
  background: linear-gradient(135deg, rgba(105, 164, 129, 0.14) 0%, rgba(231, 237, 235, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1px solid rgba(105, 164, 129, 0.15);
}

.cq-hero-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(105, 164, 129, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cq-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #528a6a;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(105, 164, 129, 0.25);
  margin-bottom: 0.85rem;
}

.cq-hero-title {
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: #1a2420;
  letter-spacing: -0.02em;
}

.cq-hero-sub {
  font-size: 1rem;
  color: #3d4f48;
  margin: 0 0 1rem;
  line-height: 1.55;
}

.cq-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.cq-meta-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(105, 164, 129, 0.2);
  color: #3d4f48;
}

.cq-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cq-toc a {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  background: #fff;
  border-radius: 8px;
  color: #528a6a;
  border: 1px solid rgba(105, 164, 129, 0.2);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cq-toc a:hover {
  background: rgba(105, 164, 129, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(105, 164, 129, 0.15);
}

.cq-hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
  min-width: 0;
}

.cq-seo-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #4b7f63;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(105, 164, 129, 0.24);
  border-radius: 999px;
  padding: 0.26rem 0.6rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cq-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.35rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  border: 1px solid rgba(105, 164, 129, 0.18);
  backdrop-filter: blur(8px);
}

.cq-stat {
  text-align: center;
  padding: 0.35rem 0.25rem;
}

.cq-stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #528a6a;
  letter-spacing: -0.02em;
}

.cq-stat-lbl {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7d75;
  margin-top: 0.15rem;
}

/* ── When / Tip card grids ── */
.cq-when-grid,
.cq-tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.cq-when-card,
.cq-tip-card {
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(105, 164, 129, 0.15);
  box-shadow: 0 4px 18px rgba(26, 36, 32, 0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  animation: cqFadeUp 0.45s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.05s);
}

.cq-when-card:hover,
.cq-tip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(105, 164, 129, 0.12);
  border-color: rgba(105, 164, 129, 0.35);
}

.cq-card-num {
  position: absolute;
  left: 0.85rem;
  top: 1rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #69A481, #528a6a);
  border-radius: 8px;
}

.cq-when-card p,
.cq-tip-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #3d4f48;
  margin: 0;
}

.cq-tip-card {
  background: linear-gradient(135deg, rgba(105, 164, 129, 0.06), #fff 60%);
}

.cq-deep-prose {
  columns: 1;
  column-gap: 2rem;
}

@media (min-width: 720px) {
  .cq-deep-prose { columns: 2; }
  .cq-deep-prose p { break-inside: avoid; }
}

/* ── Blocks ── */
.cq-block {
  padding: 1.75rem 2rem;
  border-bottom: 1px solid rgba(212, 221, 217, 0.7);
}

.cq-block:last-of-type { border-bottom: none; }

.cq-block-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.cq-block-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: linear-gradient(135deg, rgba(105, 164, 129, 0.18), rgba(105, 164, 129, 0.06));
  border-radius: 12px;
  border: 1px solid rgba(105, 164, 129, 0.2);
  flex-shrink: 0;
}

.cq-block-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: #1a2420;
  letter-spacing: -0.01em;
}

.cq-prose p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: #3d4f48;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cq-prose p:last-child { margin-bottom: 0; }

/* ── Steps grid ── */
.cq-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cq-step-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(105, 164, 129, 0.15);
  box-shadow: 0 4px 16px rgba(26, 36, 32, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cq-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(105, 164, 129, 0.12);
}

.cq-step-num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #69A481, #528a6a);
  border-radius: 10px;
}

.cq-step-text strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
  color: #1a2420;
}

.cq-step-text p {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #3d4f48;
  margin: 0;
}

/* ── Formula box ── */
.cq-formula-box {
  background: linear-gradient(135deg, #1a2420 0%, #2d3d36 100%);
  color: #e7edeb;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(105, 164, 129, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cq-formula-box p {
  margin: 0 0 0.85rem;
  line-height: 1.7;
  font-size: 0.92rem;
  color: #d4ddd9;
}

.cq-formula-box p:last-child { margin-bottom: 0; }

.cq-formula-box code {
  background: rgba(105, 164, 129, 0.25);
  color: #a8d4bc;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Prevent horizontal overflow from dynamic long tokens/code blocks */
.cq-article-inner,
.cq-block,
.cq-block-body,
.cq-callout,
.cq-v3-frame,
.cq-v3-frame pre,
.cq-v3-frame code,
.cq-authority-grid,
.cq-authority-grid a {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cq-v3-frame pre {
  white-space: pre-wrap;
}

/* ── Example cards ── */
.cq-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.cq-example-card {
  padding: 1.1rem 1.15rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(105, 164, 129, 0.15);
  box-shadow: 0 4px 20px rgba(26, 36, 32, 0.05);
  transition: transform 0.2s, border-color 0.2s;
}

.cq-example-card:hover {
  transform: translateY(-3px);
  border-color: rgba(105, 164, 129, 0.35);
}

.cq-example-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #528a6a;
  background: rgba(105, 164, 129, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.cq-example-card strong {
  display: block;
  font-size: 0.92rem;
  color: #1a2420;
  margin-bottom: 0.35rem;
}

.cq-example-card p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #3d4f48;
  margin: 0;
}

/* ── Benefits ── */
.cq-benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.cq-benefit-card {
  padding: 1rem;
  text-align: center;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(105, 164, 129, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cq-benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(105, 164, 129, 0.1);
}

.cq-benefit-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.4rem;
}

.cq-benefit-card strong {
  display: block;
  font-size: 0.88rem;
  color: #1a2420;
  margin-bottom: 0.3rem;
}

.cq-benefit-card p {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #3d4f48;
  margin: 0;
}

/* ── Mistakes ── */
.cq-mistake-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cq-mistake-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 240, 240, 0.5);
  border: 1px solid rgba(220, 100, 100, 0.15);
  border-radius: 12px;
}

.cq-mistake-x {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #c44;
  background: rgba(220, 100, 100, 0.12);
  border-radius: 8px;
}

.cq-mistake-item strong {
  display: block;
  font-size: 0.88rem;
  color: #1a2420;
  margin-bottom: 0.2rem;
}

.cq-mistake-item p {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #3d4f48;
  margin: 0;
}

/* ── Callout ── */
.cq-callout {
  padding: 1.15rem 1.25rem;
  background: linear-gradient(90deg, rgba(105, 164, 129, 0.1), rgba(105, 164, 129, 0.04));
  border-left: 4px solid #69A481;
  border-radius: 0 12px 12px 0;
}

.cq-callout p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #3d4f48;
  margin: 0 0 0.75rem;
}

.cq-callout p:last-child { margin-bottom: 0; }

/* ── Glossary ── */
.cq-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.cq-gloss-item {
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(105, 164, 129, 0.12);
}

.cq-gloss-item dt {
  font-weight: 700;
  font-size: 0.88rem;
  color: #528a6a;
  margin-bottom: 0.25rem;
}

.cq-gloss-item dd {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #3d4f48;
  margin: 0;
}

/* ── FAQ Premium ── */
.cq-faq-section-premium {
  background: linear-gradient(180deg, rgba(105, 164, 129, 0.06) 0%, transparent 100%);
  border-radius: 20px;
  padding: 1.25rem 1rem 1.5rem;
  border: 1px solid rgba(105, 164, 129, 0.12);
}

.cq-faq-section-premium .cq-block-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.cq-faq-lead {
  font-size: 0.88rem;
  color: #6b7d75;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}

.cq-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cq-faq {
  background: #fff;
  border: 1px solid rgba(105, 164, 129, 0.15);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  animation: cqFadeUp 0.5s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
  box-shadow: 0 2px 8px rgba(26, 36, 32, 0.04);
}

.cq-faq-premium:hover {
  border-color: rgba(105, 164, 129, 0.35);
  box-shadow: 0 6px 20px rgba(105, 164, 129, 0.12);
  transform: translateY(-1px);
}

.cq-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  color: #1a2420;
  transition: background 0.2s;
}

.cq-faq-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #69A481, #528a6a);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
}

.cq-faq-q {
  flex: 1;
  text-align: left;
}

.cq-faq summary::-webkit-details-marker { display: none; }

.cq-faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23528a6a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.25s;
}

.cq-faq[open] summary {
  background: rgba(105, 164, 129, 0.08);
  color: #528a6a;
}

.cq-faq[open] .cq-faq-chevron { transform: rotate(180deg); }

.cq-faq-body {
  padding: 0 1.1rem 1rem;
  border-top: 1px solid rgba(105, 164, 129, 0.1);
}

.cq-faq-body p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #3d4f48;
  margin: 0.75rem 0 0;
}

/* ── Related ── */
.cq-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}

.cq-related-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(105, 164, 129, 0.15);
  color: #1a2420;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cq-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(105, 164, 129, 0.15);
  border-color: #69A481;
  color: #528a6a;
}

.cq-related-icon { font-size: 1.25rem; }

.cq-related-name { line-height: 1.3; }

/* ── Summary footer ── */
.cq-summary-box {
  padding: 1.5rem 2rem 2rem;
  background: linear-gradient(180deg, rgba(105, 164, 129, 0.06), rgba(105, 164, 129, 0.12));
  border-top: 1px solid rgba(105, 164, 129, 0.2);
}

.cq-summary-box p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #3d4f48;
  margin: 0 0 0.75rem;
}

.cq-summary-box p:last-child { margin-bottom: 0; }

/* ── Variant links ── */
.cq-variant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cq-variant-link {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  background: #fff;
  border-radius: 999px;
  border: 1px solid rgba(105, 164, 129, 0.25);
  color: #528a6a;
  transition: background 0.2s, transform 0.2s;
}

.cq-variant-link:hover {
  background: rgba(105, 164, 129, 0.12);
  transform: translateY(-1px);
}

.sc-tool-layout .sc-calc-wrap { margin-bottom: 1rem; }

@media (max-width: 600px) {
  .cq-hero, .cq-block { padding-left: 1.15rem; padding-right: 1.15rem; }
  .cq-hero { padding-top: 1.5rem; }
  .cq-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .cq-steps-grid, .cq-example-grid, .cq-benefit-grid, .cq-when-grid, .cq-tip-grid { grid-template-columns: 1fr; }
  .cq-deep-prose { columns: 1; }
  .cq-toc a { font-size: 0.72rem; padding: 0.35rem 0.6rem; }
  .cq-article { padding: 0 0.55rem; margin-bottom: 2.4rem; }
  .cq-article-inner { border-radius: 14px; box-shadow: 0 10px 34px rgba(26, 36, 32, 0.12); }
  .cq-hero-meta { gap: 0.35rem; }
  .cq-meta-pill { font-size: 0.7rem; padding: 0.32rem 0.58rem; }
  .cq-formula-box { padding: 1rem 0.95rem; }
  .cq-faq summary { font-size: 0.84rem; padding: 0.82rem 0.9rem; }
  .cq-block-head h2 { font-size: 1.03rem; }
  .cq-prose p { font-size: 0.93rem; line-height: 1.72; }
  .cq-toc {
    position: sticky;
    bottom: 0.3rem;
    z-index: 3;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(105, 164, 129, 0.2);
    border-radius: 10px;
    padding: 0.4rem;
    backdrop-filter: blur(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cq-article, .cq-faq, .cq-step-card, .cq-example-card { animation: none; transition: none; }
}

/* Admin article content on live site */
.cq-prose img,
.cq-block-body img,
.ac-about-custom img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0.75rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.cq-prose a.ac-article-btn,
.cq-block-body a.ac-article-btn,
.ac-about-custom a.ac-article-btn {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.55rem 1.15rem;
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(21, 101, 192, 0.35);
}
.cq-prose a.ac-article-btn:hover,
.cq-block-body a.ac-article-btn:hover {
  filter: brightness(1.08);
}

/* Rich article blocks (CMS editor) */
.cq-prose .ac-figure,
.cq-block-body .ac-figure,
.ac-about-custom .ac-figure {
  margin: 1rem 0;
  clear: both;
}
.cq-prose .ac-figure img,
.cq-block-body .ac-figure img {
  display: block;
  margin: 0 auto;
}
.cq-prose .ac-img-left,
.cq-block-body .ac-img-left {
  float: left;
  max-width: 46%;
  margin: 0.25rem 1.25rem 0.75rem 0;
}
.cq-prose .ac-img-right,
.cq-block-body .ac-img-right {
  float: right;
  max-width: 46%;
  margin: 0.25rem 0 0.75rem 1.25rem;
}
.cq-prose .ac-img-center,
.cq-block-body .ac-img-center {
  text-align: center;
  max-width: 88%;
  margin-left: auto;
  margin-right: auto;
}
.cq-prose .ac-img-full,
.cq-block-body .ac-img-full {
  width: 100%;
  max-width: 100%;
}
.cq-prose .ac-img-full img,
.cq-block-body .ac-img-full img {
  width: 100%;
}
.cq-prose figcaption,
.cq-block-body figcaption {
  font-size: 0.82rem;
  color: var(--ac-text-soft);
  text-align: center;
  margin-top: 0.35rem;
}
.cq-prose .ac-cols,
.cq-block-body .ac-cols {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}
.cq-prose .ac-cols-2,
.cq-block-body .ac-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cq-prose .ac-cols-3,
.cq-block-body .ac-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cq-prose .ac-col,
.cq-block-body .ac-col {
  padding: 0.85rem;
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  background: var(--ac-surface);
}
.cq-prose .ac-article-table,
.cq-block-body .ac-article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.cq-prose .ac-article-table th,
.cq-prose .ac-article-table td,
.cq-block-body .ac-article-table th,
.cq-block-body .ac-article-table td {
  border: 1px solid var(--ac-border);
  padding: 0.55rem 0.65rem;
  text-align: left;
}
.cq-prose .ac-article-table th,
.cq-block-body .ac-article-table th {
  background: rgba(21, 101, 192, 0.08);
  font-weight: 700;
}
.cq-prose .ac-article-icon,
.cq-block-body .ac-article-icon {
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: middle;
}
.cq-prose blockquote,
.cq-block-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--ac-blue);
  background: rgba(21, 101, 192, 0.06);
  border-radius: 0 10px 10px 0;
}

/* Block alignment */
.cq-prose .ac-align-left,
.cq-block-body .ac-align-left,
.ac-about-custom .ac-align-left { text-align: left; margin-right: auto; }
.cq-prose .ac-align-center,
.cq-block-body .ac-align-center,
.ac-about-custom .ac-align-center { text-align: center; margin-left: auto; margin-right: auto; }
.cq-prose .ac-align-right,
.cq-block-body .ac-align-right,
.ac-about-custom .ac-align-right { text-align: right; margin-left: auto; }
.cq-prose .ac-align-center .ac-article-btn,
.cq-block-body .ac-align-center .ac-article-btn { margin-left: auto; margin-right: auto; }

/* Premium cards / boxes */
.cq-prose .ac-card,
.cq-block-body .ac-card,
.ac-about-custom .ac-card {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--ac-border);
  background: var(--ac-surface);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.cq-prose .ac-card-default,
.cq-block-body .ac-card-default { background: var(--ac-surface); }
.cq-prose .ac-card-premium,
.cq-block-body .ac-card-premium {
  background: linear-gradient(145deg, rgba(21, 101, 192, 0.08), rgba(13, 71, 161, 0.04));
  border: 2px solid rgba(21, 101, 192, 0.35);
  box-shadow: 0 8px 28px rgba(21, 101, 192, 0.15);
  position: relative;
}
.cq-prose .ac-card-premium::before,
.cq-block-body .ac-card-premium::before {
  content: '✨ Premium';
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1565c0;
  margin-bottom: 0.35rem;
}
.cq-prose .ac-card-blue,
.cq-block-body .ac-card-blue {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #64b5f6;
  color: #0d47a1;
}
.cq-prose .ac-card-tip,
.cq-block-body .ac-card-tip {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-color: #ffca28;
  border-left: 4px solid #ffa000;
}

/* Text background / highlight */
.cq-prose .ac-text-bg,
.cq-block-body .ac-text-bg,
.ac-about-custom .ac-text-bg {
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.cq-prose .ac-bg-yellow, .cq-block-body .ac-bg-yellow { background: #fff59d; }
.cq-prose .ac-bg-blue, .cq-block-body .ac-bg-blue { background: #bbdefb; }
.cq-prose .ac-bg-green, .cq-block-body .ac-bg-green { background: #c8e6c9; }
.cq-prose .ac-bg-pink, .cq-block-body .ac-bg-pink { background: #f8bbd0; }
.cq-prose .ac-bg-gray, .cq-block-body .ac-bg-gray { background: #eeeeee; }
.cq-prose .ac-bg-premium, .cq-block-body .ac-bg-premium {
  background: linear-gradient(90deg, #e3f2fd, #f3e5f5);
  border-bottom: 2px solid #1565c0;
}

/* Table styles */
.cq-prose .ac-table-round,
.cq-block-body .ac-table-round {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ac-border);
}
.cq-prose .ac-table-round th:first-child,
.cq-block-body .ac-table-round th:first-child { border-top-left-radius: 14px; }
.cq-prose .ac-table-round th:last-child,
.cq-block-body .ac-table-round th:last-child { border-top-right-radius: 14px; }
.cq-prose .ac-table-round tr:last-child td:first-child,
.cq-block-body .ac-table-round tr:last-child td:first-child { border-bottom-left-radius: 14px; }
.cq-prose .ac-table-round tr:last-child td:last-child,
.cq-block-body .ac-table-round tr:last-child td:last-child { border-bottom-right-radius: 14px; }
.cq-prose .ac-table-premium,
.cq-block-body .ac-table-premium {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.12);
  border: 2px solid rgba(21, 101, 192, 0.25);
}
.cq-prose .ac-table-premium th,
.cq-block-body .ac-table-premium th {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  color: #fff;
}
.cq-prose .ac-table-striped tbody tr:nth-child(even) td,
.cq-block-body .ac-table-striped tbody tr:nth-child(even) td {
  background: rgba(21, 101, 192, 0.04);
}

@media (max-width: 640px) {
  .cq-prose .ac-cols-2,
  .cq-prose .ac-cols-3,
  .cq-block-body .ac-cols-2,
  .cq-block-body .ac-cols-3 { grid-template-columns: 1fr; }
  .cq-prose .ac-img-left,
  .cq-prose .ac-img-right,
  .cq-block-body .ac-img-left,
  .cq-block-body .ac-img-right {
    float: none;
    max-width: 100%;
    margin: 0.75rem 0;
  }
}
