/* Revision article tools: CTA boxes, game cards, quizzes, flash cards, sorters, checklists, FAQs.
   Built by js/blog-tools.js from the blocks the blog-articles skill writes into posts. */

.entry-content .bl-tool, .entry-content .bl-cta, .entry-content .bl-game, .entry-content .bl-keybox {
    margin: 2rem 0; font-family: var(--body-font);
}

/* ---------- buttons (same look as the course landing pages) ---------- */
.entry-content a.bl-btn, .bl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 700 17px/1.1 var(--heading-font); border-radius: 16px; padding: 17px 26px;
    text-decoration: none !important; border: 0; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.entry-content a.bl-btn-main, .bl-btn-main {
    background: linear-gradient(180deg, #ffe55c, #ffd500 55%, #ffc400); color: #241a00 !important;
    box-shadow: 0 5px 0 #c99a00, 0 14px 30px rgba(255,170,0,.35);
}
.entry-content a.bl-btn-main:hover, .bl-btn-main:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #c99a00, 0 18px 36px rgba(255,170,0,.45); }
.entry-content a.bl-btn-ghost, .bl-btn-ghost { background: #fff; color: #1d1d1f !important; border: 2px solid #1d1d1f; }
.entry-content a.bl-btn-ghost:hover, .bl-btn-ghost:hover { background: #1d1d1f; color: #fff !important; }
.bl-btn-small { font-size: 15px !important; padding: 12px 18px !important; border-radius: 12px !important; }

/* ---------- CTA box ---------- */
.bl-cta {
    position: relative; overflow: hidden; border-radius: 22px; padding: 30px 30px 32px;
    background: radial-gradient(circle at 92% 8%, rgba(255,213,0,.35), transparent 42%), #1d1d1f; color: #fff;
}
.bl-cta::after { content: "🍋"; position: absolute; right: 18px; bottom: -14px; font-size: 92px; opacity: .14; transform: rotate(-18deg); }
.bl-cta .bl-cta-kicker { display: inline-block; font: 700 12px var(--heading-font); letter-spacing: .14em; text-transform: uppercase; color: #1d1d1f; background: #ffd500; border-radius: 99px; padding: 6px 12px; margin-bottom: 14px; }
.entry-content .bl-cta h3, .bl-cta h3 { color: #fff; font: 700 1.55rem/1.25 var(--heading-font); margin: 0 0 10px; }
.entry-content .bl-cta p, .bl-cta p { color: rgba(255,255,255,.86); margin: 0 0 18px; font-size: 1.02rem; line-height: 1.6; }
.bl-cta ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.entry-content .bl-cta ul li, .bl-cta li { color: #fff; margin: 0; padding-left: 28px; position: relative; line-height: 1.45; }
.bl-cta li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #1d1d1f; background: #ffd500; width: 19px; height: 19px; border-radius: 50%; font: 700 12px/19px var(--heading-font); text-align: center; }
.bl-cta .bl-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.entry-content .bl-cta a.bl-btn-ghost, .bl-cta .bl-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.55); }
.entry-content .bl-cta a.bl-btn-ghost:hover, .bl-cta .bl-btn-ghost:hover { background: #fff; color: #1d1d1f !important; }
.bl-cta .bl-cta-note { margin: 14px 0 0; font-size: .9rem; color: rgba(255,255,255,.65); }

/* slim CTA strip used mid-article */
.bl-cta.bl-cta-slim { padding: 20px 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: #fff8d6; color: #1d1d1f; border: 2px solid #ffd500; }
.bl-cta.bl-cta-slim::after { display: none; }
.entry-content .bl-cta.bl-cta-slim p, .bl-cta.bl-cta-slim p { color: #1d1d1f; margin: 0; flex: 1 1 260px; }

/* ---------- game card ---------- */
.bl-game { display: grid; grid-template-columns: 220px 1fr; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.1); border: 1px solid #eee; }
.bl-game .bl-game-img { background: #1d1d1f center/cover no-repeat; min-height: 170px; display: block; }
.bl-game .bl-game-body { padding: 20px 22px; }
.bl-game .bl-game-tag { font: 700 11px var(--heading-font); letter-spacing: .14em; text-transform: uppercase; color: #c46f00; }
.entry-content .bl-game h4, .bl-game h4 { margin: 6px 0 6px; font: 700 1.2rem/1.3 var(--heading-font); }
.entry-content .bl-game p, .bl-game p { margin: 0 0 14px; font-size: .97rem; color: #555; line-height: 1.55; }

/* ---------- key facts box ---------- */
.bl-keybox { border-left: 6px solid #ffd500; background: #fffbea; border-radius: 0 16px 16px 0; padding: 20px 24px; }
.entry-content .bl-keybox h4, .bl-keybox h4 { margin: 0 0 10px; font: 700 1.05rem var(--heading-font); }
.entry-content .bl-keybox ul, .bl-keybox ul { margin: 0; padding-left: 1.2rem; }
.entry-content .bl-keybox p:last-child { margin-bottom: 0; }

/* ---------- shared tool shell ---------- */
.bl-tool { border-radius: 20px; background: #fff; border: 2px solid #1d1d1f; box-shadow: 6px 6px 0 #ffd500; padding: 22px 24px 24px; }
.bl-tool .bl-tool-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bl-tool .bl-tool-icon { width: 38px; height: 38px; border-radius: 12px; background: #ffd500; display: grid; place-items: center; font-size: 19px; flex: none; }
.bl-tool .bl-tool-title { font: 700 1.15rem/1.25 var(--heading-font); color: #1d1d1f; margin: 0; }
.bl-tool .bl-tool-sub { font-size: .9rem; color: #666; margin: 2px 0 0; }
.bl-tool button { font-family: var(--heading-font); }
.bl-tool script { display: none; }

/* quiz */
.bl-quiz-q { font: 600 1.05rem/1.45 var(--heading-font); margin: 0 0 12px; color: #1d1d1f; }
.bl-quiz-count { font-size: .82rem; color: #888; margin-bottom: 4px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.bl-quiz-opts { display: grid; gap: 10px; }
.bl-quiz-opt { text-align: left; padding: 13px 16px; border-radius: 12px; border: 2px solid #e2e2e2; background: #fafafa; font-size: 1rem; cursor: pointer; transition: border-color .15s, background .15s; color: #222; }
.bl-quiz-opt:hover:not([disabled]) { border-color: #ffd500; background: #fffbea; }
.bl-quiz-opt.right { border-color: #18a957; background: #e9f9ef; }
.bl-quiz-opt.wrong { border-color: #e04848; background: #fdecec; }
.bl-quiz-opt[disabled] { cursor: default; }
.bl-quiz-why { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #f4f4f4; font-size: .97rem; line-height: 1.55; }
.bl-quiz-why b { font-family: var(--heading-font); }
.bl-tool-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.bl-tool-btn { padding: 11px 18px; border-radius: 12px; border: 0; background: #1d1d1f; color: #fff; font-weight: 600; font-size: .97rem; cursor: pointer; }
.bl-tool-btn:hover { background: #000; }
.bl-tool-btn.alt { background: #ffd500; color: #1d1d1f; }
.bl-score { font: 700 1.6rem var(--heading-font); }
.bl-progress { height: 8px; border-radius: 9px; background: #eee; overflow: hidden; margin-bottom: 16px; }
.bl-progress span { display: block; height: 100%; background: linear-gradient(90deg, #ffd500, #ff9a00); transition: width .3s; }

/* flash cards */
.bl-card { perspective: 1200px; height: 210px; cursor: pointer; margin-bottom: 4px; }
.bl-card-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.bl-card.flip .bl-card-inner { transform: rotateY(180deg); }
.bl-card-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; display: grid; place-items: center; text-align: center; padding: 20px 26px; overflow: auto; }
.bl-card-front { background: #ffd500; color: #1d1d1f; font: 700 1.3rem/1.35 var(--heading-font); }
.bl-card-back { background: #1d1d1f; color: #fff; transform: rotateY(180deg); font-size: 1.02rem; line-height: 1.55; }
.bl-card-hint { text-align: center; font-size: .85rem; color: #888; margin-top: 8px; }

/* sorter */
.bl-sort-item { padding: 16px 18px; border-radius: 14px; background: #fffbea; border: 2px dashed #ffd500; font: 600 1.02rem/1.45 var(--heading-font); text-align: center; margin-bottom: 14px; }
.bl-sort-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bl-sort-btns button { padding: 13px 14px; border-radius: 12px; border: 2px solid #1d1d1f; background: #fff; font-weight: 700; font-size: .98rem; cursor: pointer; color: #1d1d1f; }
.bl-sort-btns button:hover:not([disabled]) { background: #1d1d1f; color: #fff; }
.bl-sort-btns button.right { background: #18a957; border-color: #18a957; color: #fff; }
.bl-sort-btns button.wrong { background: #e04848; border-color: #e04848; color: #fff; }

/* order the steps */
.bl-steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.entry-content .bl-steps-list li, .bl-steps-list li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: #fafafa; border: 2px solid #e6e6e6; margin: 0; }
.bl-steps-list li.right { border-color: #18a957; background: #e9f9ef; }
.bl-steps-list li.wrong { border-color: #e04848; background: #fdecec; }
.bl-steps-list .bl-step-txt { flex: 1; line-height: 1.4; }
.bl-steps-list .bl-step-num { width: 28px; height: 28px; border-radius: 50%; background: #ffd500; display: grid; place-items: center; font: 700 .9rem var(--heading-font); flex: none; }
.bl-steps-list button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #1d1d1f; color: #fff; cursor: pointer; font-size: .9rem; }
.bl-steps-list button[disabled] { opacity: .25; cursor: default; }

/* checklist */
.entry-content .bl-checklist ul, .bl-checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.entry-content .bl-checklist li, .bl-checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; background: #fafafa; cursor: pointer; margin: 0; line-height: 1.45; user-select: none; }
.bl-checklist li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #1d1d1f; background: #fff; margin-top: 1px; }
.bl-checklist li.done { background: #e9f9ef; color: #4b6b57; }
.bl-checklist li.done::before { content: "✓"; background: #18a957; border-color: #18a957; color: #fff; font: 700 14px/18px var(--heading-font); text-align: center; }
.bl-checklist .bl-check-count { font-weight: 700; font-family: var(--heading-font); }

/* countdown */
.bl-countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.bl-countdown-grid div { background: #1d1d1f; color: #ffd500; border-radius: 14px; padding: 14px 6px; font: 700 1.9rem/1 var(--heading-font); }
.bl-countdown-grid small { display: block; color: #fff; font: 500 .78rem var(--body-font); margin-top: 6px; letter-spacing: .08em; text-transform: uppercase; }

/* FAQs */
.entry-content details.bl-faq, details.bl-faq { border: 2px solid #eee; border-radius: 14px; padding: 0; margin: 0 0 10px; background: #fff; }
details.bl-faq summary { cursor: pointer; list-style: none; padding: 15px 48px 15px 18px; font: 600 1.02rem/1.4 var(--heading-font); position: relative; color: #1d1d1f; }
details.bl-faq summary::-webkit-details-marker { display: none; }
details.bl-faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: #ffd500; display: grid; place-items: center; font-weight: 700; }
details.bl-faq[open] summary::after { content: "−"; }
details.bl-faq[open] { border-color: #ffd500; }
details.bl-faq > div, details.bl-faq > p { padding: 0 18px 16px; margin: 0; line-height: 1.6; }

/* tables in articles */
.entry-content .bl-table-wrap { overflow-x: auto; margin: 1.6rem 0; border-radius: 14px; border: 1px solid #e6e6e6; }
.entry-content .bl-table-wrap table { width: 100%; border-collapse: collapse; margin: 0; font-size: .97rem; }
.entry-content .bl-table-wrap th { background: #1d1d1f; color: #fff; text-align: left; padding: 12px 14px; font-family: var(--heading-font); font-weight: 600; }
.entry-content .bl-table-wrap td { padding: 11px 14px; border-top: 1px solid #eee; vertical-align: top; }
.entry-content .bl-table-wrap tr:nth-child(even) td { background: #fafafa; }

.entry-content img.bl-img { width: 100%; height: auto; border-radius: 16px; margin: 1.4rem 0 .4rem; }
.entry-content .bl-caption { font-size: .88rem; color: #777; text-align: center; margin: 0 0 1.6rem; }

@media (max-width: 640px) {
    .bl-cta { padding: 24px 20px 26px; }
    .bl-cta .bl-cta-btns .bl-btn { width: 100%; }
    .bl-game { grid-template-columns: 1fr; }
    .bl-game .bl-game-img { min-height: 160px; }
    .bl-tool { padding: 18px 16px 20px; box-shadow: 4px 4px 0 #ffd500; }
    .bl-card { height: 240px; }
    .bl-countdown-grid div { font-size: 1.4rem; }
}

/* tags under articles: the theme's mint pill with orange link text was hard to read */
.post-tags .tag { background: #1d1d1f; padding: 0; }
.post-tags .tag a { display: inline-block; padding: .35rem .9rem; color: #fff !important; text-decoration: none; font-weight: 500; }
.post-tags .tag:hover { background: #ffd500; }
.post-tags .tag:hover a { color: #1d1d1f !important; }

/* ---------- data bars: real published figures (grade results, entries...) - plain HTML, no JS ---------- */
.bl-bars { border-radius: 20px; background: #1d1d1f; color: #fff; padding: 24px 26px 20px; margin: 2rem 0; }
.entry-content .bl-bars h4, .bl-bars h4 { color: #fff; font: 700 1.15rem/1.3 var(--heading-font); margin: 0 0 4px; }
.entry-content .bl-bars .bl-bars-sub, .bl-bars .bl-bars-sub { color: rgba(255,255,255,.7); font-size: .92rem; margin: 0 0 18px; }
.bl-bar { display: grid; grid-template-columns: 92px 1fr 58px; align-items: center; gap: 12px; margin-bottom: 9px; }
.bl-bar-label { font: 600 .92rem var(--heading-font); color: #fff; }
.bl-bar-track { height: 22px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; }
.bl-bar-fill { display: block; height: 100%; width: calc(var(--v) * 1%); border-radius: 8px; background: linear-gradient(90deg, #ffd500, #ff9a00); }
.bl-bar.hi .bl-bar-fill { background: linear-gradient(90deg, #5ce3ba, #2bb58a); }
.bl-bar-val { font: 700 .95rem var(--heading-font); color: #ffd500; text-align: right; }
.entry-content .bl-bars .bl-source, .bl-bars .bl-source { margin: 14px 0 0; font-size: .82rem; color: rgba(255,255,255,.6); }
.entry-content .bl-bars .bl-source a { color: #ffd500; }

/* ---------- study plan calculator ---------- */
.bl-planner-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bl-planner-form label { display: grid; gap: 6px; font: 600 .88rem var(--heading-font); color: #444; }
.bl-planner-form select { padding: 11px 12px; border-radius: 12px; border: 2px solid #e2e2e2; font: 500 1rem var(--body-font); background: #fff; color: #1d1d1f; }
.bl-planner-form select:focus { outline: none; border-color: #ffd500; }
.bl-planner-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.bl-planner-out div { background: #fffbea; border: 2px solid #ffd500; border-radius: 14px; padding: 14px 12px; text-align: center; }
.bl-planner-out b { display: block; font: 700 1.7rem/1.1 var(--heading-font); color: #1d1d1f; }
.bl-planner-out small { display: block; margin-top: 6px; color: #666; font-size: .82rem; line-height: 1.35; }
.bl-planner-note { margin: 14px 0 0; font-size: .95rem; line-height: 1.55; }
@media (max-width: 640px) { .bl-bar { grid-template-columns: 70px 1fr 50px; gap: 8px; } }
