/* CGPrep Learning Content Design System v1
 * Intentionally minimal: CGPrep blue + neutral borders/backgrounds only.
 * Scoped to article content so other CGPrep sections remain untouched.
 */
.cgprep-entry-content,
.cgprep-learning-content{
  --cgl-accent:var(--cg-blue,#0874e8);
  --cgl-heading:var(--cg-dark,#0b2d55);
  --cgl-text:var(--cg-text,#25364d);
  --cgl-border:var(--cg-border,#dce8f5);
  --cgl-soft:var(--cg-bg,#f7fbff);
  --cgl-radius:9px;
}
.cgprep-entry-content :where(p,ul,ol),
.cgprep-learning-content :where(p,ul,ol){margin-top:.7em;margin-bottom:.9em}
.cgprep-entry-content :where(h2,h3,h4),
.cgprep-learning-content :where(h2,h3,h4){color:var(--cgl-heading);line-height:1.3}
.cgprep-entry-content h2,
.cgprep-learning-content h2{padding-left:.7rem;border-left:4px solid var(--cgl-accent)}

/* Concept / definition / rule / note / tip: one restrained visual language. */
.cgprep-entry-content :where(.box,.concept-section,.concept-card,.cgprep-concept,.definition-box,.cgprep-definition,.rule-box,.cgprep-rule,.note,.cgprep-note,.trick-box,.pro-tip,.cgprep-tip,.category-box,.rules-container),
.cgprep-learning-content :where(.box,.concept-section,.concept-card,.cgprep-concept,.definition-box,.cgprep-definition,.rule-box,.cgprep-rule,.note,.cgprep-note,.trick-box,.pro-tip,.cgprep-tip,.category-box,.rules-container){
  margin:1.25rem 0;padding:1rem 1.1rem;border:1px solid var(--cgl-border);border-left:4px solid var(--cgl-accent);border-radius:var(--cgl-radius);background:var(--cgl-soft)
}

/* Formula stays neutral and readable instead of becoming another colored box. */
.cgprep-entry-content :where(.formula-box,.cgprep-formula),
.cgprep-learning-content :where(.formula-box,.cgprep-formula){
  margin:1.15rem 0;padding:.9rem 1rem;border:1px solid var(--cgl-border);border-radius:var(--cgl-radius);background:#fff;text-align:center;font-weight:600;overflow-x:auto
}

.cgprep-entry-content :where(.example-card,.example-box,.cgprep-example,.cgprep-question,.eqp-q-block),
.cgprep-learning-content :where(.example-card,.example-box,.cgprep-example,.cgprep-question,.eqp-q-block){
  margin:1.2rem 0;padding:1rem 1.1rem;border:1px solid var(--cgl-border);border-radius:var(--cgl-radius);background:#fff
}
.cgprep-entry-content :where(.question-label,.q-label,.cgprep-question-label),
.cgprep-learning-content :where(.question-label,.q-label,.cgprep-question-label){display:block;margin-bottom:.45rem;color:var(--cgl-accent);font-weight:700}
.cgprep-entry-content :where(.solution-step,.solution,.cgprep-solution,.cgprep-explanation),
.cgprep-learning-content :where(.solution-step,.solution,.cgprep-solution,.cgprep-explanation){margin-top:.8rem;padding:.65rem 0 .65rem .9rem;border-left:3px solid var(--cgl-border)}
.cgprep-entry-content :where(.step-title),
.cgprep-learning-content :where(.step-title){font-weight:700;color:var(--cgl-heading)}

/* Practice / Edu Quiz Pro Blog Poster compatibility. */
.cgprep-entry-content :where(.quiz-container,.cgprep-practice,.eqp-blog-wrap),
.cgprep-learning-content :where(.quiz-container,.cgprep-practice,.eqp-blog-wrap){margin-top:1.6rem}
.cgprep-entry-content :where(.eqp-passage,.cgprep-passage),
.cgprep-learning-content :where(.eqp-passage,.cgprep-passage){margin:1rem 0;padding:.9rem 1rem;border-left:4px solid var(--cgl-accent);background:var(--cgl-soft);font-style:normal}
.cgprep-entry-content :where(.eqp-q-text,.cgprep-question-text),
.cgprep-learning-content :where(.eqp-q-text,.cgprep-question-text){font-weight:600;color:var(--cgl-heading)}
.cgprep-entry-content :where(.eqp-options-list,.cgprep-options),
.cgprep-learning-content :where(.eqp-options-list,.cgprep-options){margin:.75rem 0;padding-left:1.6rem}
.cgprep-entry-content :where(.eqp-options-list,.cgprep-options) li,
.cgprep-learning-content :where(.eqp-options-list,.cgprep-options) li{margin:.35rem 0}

/* Answer/details boxes. */
.cgprep-entry-content details,
.cgprep-learning-content details{margin:1rem 0;padding:.75rem .9rem;border:1px solid var(--cgl-border);border-radius:var(--cgl-radius);background:var(--cgl-soft)}
.cgprep-entry-content summary,
.cgprep-learning-content summary{cursor:pointer;font-weight:650;color:var(--cgl-accent)}

/* Tables: compact, full-width educational tables with reliable mobile overflow. */
.cgprep-entry-content :where(.table-wrap,.wp-block-table),
.cgprep-learning-content :where(.table-wrap,.wp-block-table){
  display:block;width:100%;max-width:100%;margin:1.1rem 0;overflow-x:auto;-webkit-overflow-scrolling:touch;background:transparent;border:0;box-shadow:none
}
.cgprep-entry-content .wp-block-table table,
.cgprep-learning-content .wp-block-table table,
.cgprep-entry-content :where(table.data-table),
.cgprep-learning-content :where(table.data-table){
  width:100%!important;max-width:none;min-width:100%;margin:0;border-collapse:collapse;table-layout:auto;background:#fff;box-shadow:none
}
/* Plain legacy tables remain supported when they are not inside a Gutenberg figure. */
.cgprep-entry-content > table,
.cgprep-learning-content > table{width:100%!important;max-width:100%;margin:1.1rem 0;border-collapse:collapse;background:#fff}
.cgprep-entry-content :where(th,td),
.cgprep-learning-content :where(th,td){padding:.62rem .75rem;border:1px solid var(--cgl-border);vertical-align:top;text-align:left;line-height:1.5;overflow-wrap:break-word}
.cgprep-entry-content th,
.cgprep-learning-content th{background:var(--cgl-soft);color:var(--cgl-heading);font-weight:700}
.cgprep-entry-content tbody tr:nth-child(even),
.cgprep-learning-content tbody tr:nth-child(even){background:#fbfdff}
/* Avoid Gutenberg/Astra figure defaults creating a wide blank white card around a narrow table. */
.cgprep-entry-content figure.wp-block-table,
.cgprep-learning-content figure.wp-block-table{padding:0!important;border-radius:0;box-shadow:none!important}
.cgprep-entry-content figure.wp-block-table figcaption,
.cgprep-learning-content figure.wp-block-table figcaption{padding:.35rem .25rem 0}
/* Lists inside learning content: compact, semantic spacing without affecting navigation/sidebar lists. */
.cgprep-entry-content :where(ul,ol),
.cgprep-learning-content :where(ul,ol){padding-left:1.45rem}
.cgprep-entry-content :where(li),
.cgprep-learning-content :where(li){margin:.28rem 0}
.cgprep-entry-content li > :where(ul,ol),
.cgprep-learning-content li > :where(ul,ol){margin:.35rem 0 .2rem;padding-left:1.35rem}
.cgprep-entry-content li > p,
.cgprep-learning-content li > p{margin:.2rem 0}

.cgprep-entry-content :where(img,svg),.cgprep-learning-content :where(img,svg){max-width:100%;height:auto}
.cgprep-entry-content figure,.cgprep-learning-content figure{max-width:100%;margin:1.4rem auto}
.cgprep-entry-content figcaption,.cgprep-learning-content figcaption{margin-top:.4rem;text-align:center;font-size:.9em;color:#718096}
.cgprep-entry-content blockquote,.cgprep-learning-content blockquote{margin:1.2rem 0;padding:.75rem 1rem;border-left:4px solid var(--cgl-border);background:var(--cgl-soft);color:inherit}
.cgprep-entry-content .badge,.cgprep-learning-content .badge{display:inline-block;padding:.15rem .5rem;border:1px solid var(--cgl-border);border-radius:999px;font-size:.82em;font-weight:650;background:#fff}

@media(max-width:600px){
  .cgprep-entry-content h2,.cgprep-learning-content h2{padding-left:.55rem}
  .cgprep-entry-content :where(.box,.concept-section,.concept-card,.cgprep-concept,.example-card,.example-box,.cgprep-example,.cgprep-question,.eqp-q-block),
  .cgprep-learning-content :where(.box,.concept-section,.concept-card,.cgprep-concept,.example-card,.example-box,.cgprep-example,.cgprep-question,.eqp-q-block){padding:.85rem}
  .cgprep-entry-content :where(table,.data-table),.cgprep-learning-content :where(table,.data-table){font-size:.94em}
}
@media print{
  .cgprep-entry-content details>* ,.cgprep-learning-content details>*{display:block!important}
  .cgprep-entry-content :where(.formula-box,.cgprep-formula,.example-card,.example-box,.cgprep-example,.cgprep-question),
  .cgprep-learning-content :where(.formula-box,.cgprep-formula,.example-card,.example-box,.cgprep-example,.cgprep-question){break-inside:avoid;box-shadow:none}
}

/* v2.2.1 — independent, closed-by-default practice answers */
.cgprep-practice-item{margin:1rem 0;padding:1rem 1.1rem;border:1px solid #dce8f5;border-radius:12px;background:#fff}
.cgprep-practice-question{margin-bottom:.65rem;font-weight:650;line-height:1.7}
.cgprep-practice-answer summary{display:inline-block;cursor:pointer;border-radius:8px;padding:.45rem .85rem;background:#edf6ff;color:#075a9c;font-weight:650;list-style:none}
.cgprep-practice-answer summary::-webkit-details-marker{display:none}
.cgprep-practice-answer summary:focus-visible{outline:3px solid #126fc6;outline-offset:3px}
.cgprep-practice-answer summary::before{content:'▸ ';font-size:1.1em}
.cgprep-practice-answer[open] summary::before{content:'▾ '}
.cgprep-practice-answer-body{margin-top:.8rem;padding:.8rem 1rem;border-left:3px solid #1681cc;background:#f5faff;line-height:1.75}
.cgprep-practice-answer-body > :last-child{margin-bottom:0}
@media print{.cgprep-practice-answer-body{display:block!important}}

/* CGPrep v2.3 Practice Question Card: scoped and accessible */
.cgprep-entry-content .cgprep-practice-card,.cgprep-learning-content .cgprep-practice-card{margin:1.15rem 0;padding:1.15rem 1.25rem;border:1px solid #d9e7f5;border-radius:14px;background:#fff;box-shadow:0 3px 14px rgba(14,56,101,.045)}
.cgprep-practice-head{display:flex;align-items:flex-start;gap:.75rem}
.cgprep-practice-number{flex:0 0 auto;min-width:2rem;text-align:center;border-radius:7px;background:#eaf3ff;color:#0b579e;font-weight:800;padding:.1rem .4rem}
.cgprep-practice-card .cgprep-practice-question{flex:1;margin:0;font-weight:650;color:#173451;line-height:1.7}
.cgprep-practice-meta{display:flex;gap:.5rem;flex-wrap:wrap;margin:.65rem 0 0}
.cgprep-practice-meta span{font-size:.78rem;color:#526780;background:#f1f5fa;border-radius:99px;padding:.12rem .65rem}
.cgprep-practice-card details.cgprep-practice-answer{display:block;margin:.9rem 0 0;padding:0;border:0;background:transparent}
.cgprep-practice-card details.cgprep-practice-answer summary{display:inline-flex;align-items:center;gap:.3rem;cursor:pointer;list-style:none;background:#edf6ff;border:1px solid #bcdcf7;color:#075a9c;border-radius:9px;padding:.48rem .85rem;font-size:.9rem;font-weight:700}
.cgprep-practice-card details.cgprep-practice-answer summary::-webkit-details-marker{display:none}
.cgprep-practice-card details.cgprep-practice-answer summary:focus-visible{outline:3px solid #0874e8;outline-offset:3px}
.cgprep-practice-card details.cgprep-practice-answer summary::before{content:'▸';margin-right:.2rem}
.cgprep-practice-card details.cgprep-practice-answer[open] summary::before{content:'▾'}
.cgprep-practice-card .cgprep-practice-hide{display:none}
.cgprep-practice-card details[open] .cgprep-practice-hide{display:inline}
.cgprep-practice-card details[open] .cgprep-practice-show{display:none}
.cgprep-practice-card .cgprep-practice-answer-body{margin-top:.8rem;padding:1rem 1.1rem;border-left:4px solid #1681cc;border-radius:0 9px 9px 0;background:#f3f9ff;line-height:1.75}
.cgprep-answer-heading{display:block;margin-bottom:.4rem;color:#0b579e}
@media(max-width:600px){.cgprep-entry-content .cgprep-practice-card,.cgprep-learning-content .cgprep-practice-card{padding:.85rem}.cgprep-practice-head{gap:.5rem}}
@media print{.cgprep-practice-card details .cgprep-practice-answer-body{display:block!important}.cgprep-practice-card details .cgprep-practice-answer-body{content-visibility:visible!important}}
