/*
 * Skill-eD Blog Desk - the looks of the editor's blocks (bdb-...) and of the Key takeaways box (bdk-...).
 *
 * This is the desk's copy (blogdesk/assets/site/blog-desk.css). Publishing copies it to the website's
 * assets/css/blog-desk.css, and a post with a block or a takeaways box links it after css/style.css. The
 * editor's canvas and the block gallery load this same file, so a block looks the same everywhere.
 *
 * Every rule is inside the article (.prose: the post's <article>, the editor's canvas and the gallery's previews),
 * so nothing here can touch the website's header, footer or sidebar. Colours are the website's own tokens
 * (style.css :root), with the same values written after them for a page without those tokens. Text colours
 * pass WCAG AA on their backgrounds (4.5:1 or more): the website's coral (#f8732e) and its darker #e85c1a are
 * only used for borders, never for small text.
 *
 * The website's own parts that blocks use (the .btn buttons, ul.ticks, the comparison table .cmp, the questions
 * box .faq) keep the website's looks: style.css draws them.
 */

/* ---------- every block ---------- */
.prose .bdb-block { margin: 1.6rem 0; }
.prose .bdb-block:first-child { margin-top: 0; }

/* A row of buttons (the site's .btn, .btn.ghost, and the call and WhatsApp ones below). */
.prose .bdb-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }

/* Call: deep ink. WhatsApp: the dark WhatsApp green (#0F7A40, white text 5.4:1; never dark text on #25D366). */
.prose a.btn.bdb-btn-call { background: var(--ink, #3a2f55); color: #fff; }
.prose a.btn.bdb-btn-call:hover { background: #2a2140; color: #fff; }
.prose a.btn.bdb-btn-whatsapp { background: #0f7a40; color: #fff; }
.prose a.btn.bdb-btn-whatsapp:hover { background: #0b6332; color: #fff; }

/* ---------- Key takeaways (drawn by the desk after the post's picture) ---------- */
.prose .bdk-takeaways {
    margin: 0 0 1.8rem;
    padding: 1.2rem 1.4rem 1.15rem;
    background: var(--paper, #fff);
    border: 2px solid var(--line, #f0e2d2);
    border-top: 6px solid var(--sun, #ffc02e);
    border-radius: var(--r, 22px);
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(58, 47, 85, .10));
}
.prose .bdk-takeaways .bdk-takeaways-title {
    margin: 0;
    font-family: var(--display, 'Fredoka', system-ui, sans-serif);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--ink, #3a2f55);
}
.prose .bdk-takeaways ul.ticks { margin: .75rem 0 0; gap: .6rem; }
.prose .bdk-takeaways ul.ticks li { color: var(--ink, #3a2f55); font-weight: 600; line-height: 1.55; }

/* ---------- Call and WhatsApp strip ---------- */
.prose .bdb-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.4rem;
    padding: 1.2rem 1.4rem;
    background: var(--paper, #fff);
    border: 2px solid var(--line, #f0e2d2);
    border-radius: var(--r, 22px);
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(58, 47, 85, .10));
}
.prose .bdb-contact .bdb-contact-text { flex: 1 1 15rem; margin: 0; color: #4a4068; line-height: 1.5; }
.prose .bdb-contact .bdb-contact-text strong { color: var(--ink, #3a2f55); }
.prose .bdb-contact .bdb-buttons { margin: 0; }

/* ---------- Invitation box (a short line and two buttons) ---------- */
.prose .bdb-cta {
    padding: 1.5rem 1.6rem;
    background: linear-gradient(160deg, #fff8ec, #e9f7fc);
    border: 2px solid var(--line, #f0e2d2);
    border-left: 8px solid var(--sky, #2dbeec);
    border-radius: var(--r-lg, 32px);
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(58, 47, 85, .10));
}
.prose .bdb-cta p { margin: 0 0 .6rem; }
.prose .bdb-cta .bdb-cta-title {
    margin: 0 0 .4rem;
    font-family: var(--display, 'Fredoka', system-ui, sans-serif);
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.25;
    color: var(--ink, #3a2f55);
}
.prose .bdb-cta .bdb-buttons { margin: 1rem 0 0; }

/* ---------- Tip, Note and Important boxes ---------- */
.prose .bdb-callout {
    padding: 1.1rem 1.3rem 1.1rem 1.4rem;
    border: 2px solid var(--line, #f0e2d2);
    border-left-width: 8px;
    border-radius: var(--r, 22px);
}
.prose .bdb-callout p { margin: 0 0 .6rem; }
.prose .bdb-callout p:last-child { margin-bottom: 0; }
.prose .bdb-callout .bdb-callout-title {
    margin: 0 0 .3rem;
    font-family: var(--display, 'Fredoka', system-ui, sans-serif);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.25;
}
.prose .bdb-callout-tip { background: #eef8e4; border-color: #d6ecbd; border-left-color: var(--leaf-d, #6fae26); }
.prose .bdb-callout-tip .bdb-callout-title { color: #2f6b12; }
.prose .bdb-callout-note { background: #e9f7fc; border-color: #c4e9f6; border-left-color: var(--sky-d, #179ec9); }
.prose .bdb-callout-note .bdb-callout-title { color: #0e5a73; }
.prose .bdb-callout-important { background: #fff1e6; border-color: #fbd9c3; border-left-color: var(--coral-d, #e85c1a); }
.prose .bdb-callout-important .bdb-callout-title { color: #a8400f; }

/* ---------- A parent's (or a teacher's) words ---------- */
.prose blockquote.bdb-quote {
    padding: 1.3rem 1.5rem 1.2rem 1.6rem;
    background: var(--paper, #fff);
    border: 2px solid var(--line, #f0e2d2);
    border-left: 8px solid var(--sun, #ffc02e);
    border-radius: var(--r, 22px);
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(58, 47, 85, .10));
    font-style: normal;
    font-size: 1rem;
}
.prose .bdb-quote .bdb-quote-text {
    margin: 0 0 .75rem;
    font-family: var(--display, 'Fredoka', system-ui, sans-serif);
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.45;
    color: var(--ink, #3a2f55);
}
.prose .bdb-quote .bdb-quote-by { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.4; color: var(--ink-soft, #6c6286); }
.prose .bdb-quote .bdb-quote-by strong { color: var(--ink, #3a2f55); }

/* ---------- Facts in a row (a number or a word, and what it means) ---------- */
.prose .bdb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .9rem; }
.prose .bdb-fact {
    padding: 1.05rem 1rem 1rem;
    text-align: center;
    background: var(--paper, #fff);
    border: 2px solid var(--line, #f0e2d2);
    border-top: 6px solid var(--coral, #f8732e);
    border-radius: var(--r, 22px);
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(58, 47, 85, .10));
}
.prose .bdb-fact:nth-child(3n+2) { border-top-color: var(--sky, #2dbeec); }
.prose .bdb-fact:nth-child(3n+3) { border-top-color: var(--grape, #9b6dde); }
.prose .bdb-fact p { margin: 0; }
.prose .bdb-fact .bdb-fact-num {
    margin-bottom: .3rem;
    font-family: var(--display, 'Fredoka', system-ui, sans-serif);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.2vw, 2rem);
    line-height: 1.1;
    color: #b8430e;
    overflow-wrap: anywhere;
}
.prose .bdb-fact:nth-child(3n+2) .bdb-fact-num { color: #0b6d91; }
.prose .bdb-fact:nth-child(3n+3) .bdb-fact-num { color: var(--grape-d, #7d4fc4); }
.prose .bdb-fact .bdb-fact-label { font-size: .95rem; font-weight: 700; line-height: 1.35; color: var(--ink-soft, #6c6286); }

/* ---------- Numbered steps ---------- */
.prose ol.bdb-steps { list-style: none; counter-reset: bdb-step; padding: 0; }
.prose ol.bdb-steps > li {
    counter-increment: bdb-step;
    position: relative;
    min-height: 2.3rem;
    padding: .2rem 0 0 3.2rem;
    color: #4a4068;
    line-height: 1.6;
}
.prose ol.bdb-steps > li + li { margin-top: 1rem; }
.prose ol.bdb-steps > li::before {
    content: counter(bdb-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.3rem;
    height: 2.3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #b8430e;
    color: #fff;
    font-family: var(--display, 'Fredoka', system-ui, sans-serif);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1;
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(58, 47, 85, .10));
}
.prose ol.bdb-steps > li strong { color: var(--ink, #3a2f55); }

/* ---------- A numbered list written with the toolbar (the website's stylesheet has none) ---------- */
.prose ol.bdb-list { margin: 1.2rem 0; padding-left: 1.7rem; list-style: decimal; }
.prose ol.bdb-list > li { padding-left: .3rem; color: #4a4068; }
.prose ol.bdb-list > li + li { margin-top: .5rem; }
.prose ol.bdb-list > li::marker { color: #b8430e; font-family: var(--display, 'Fredoka', system-ui, sans-serif); font-weight: 600; }

/* ---------- Sources ---------- */
.prose ol.bdb-sources { margin: 1rem 0 1.6rem; padding-left: 1.6rem; list-style: decimal; font-size: .95rem; color: #4a4068; }
.prose ol.bdb-sources > li { padding-left: .25rem; line-height: 1.55; overflow-wrap: anywhere; }
.prose ol.bdb-sources > li + li { margin-top: .5rem; }
.prose ol.bdb-sources > li::marker { color: var(--ink-soft, #6c6286); font-weight: 700; }

/* ---------- A picture in the article (as the post's own picture at the top) ---------- */
.prose figure.bdb-figure { margin: 1.8rem 0; }
.prose figure.bdb-figure img {
    width: 100%;
    height: auto;
    border: 6px solid #fff;
    border-radius: var(--r-lg, 32px);
    box-shadow: var(--shadow, 0 18px 40px rgba(58, 47, 85, .14));
}
.prose figure.bdb-figure figcaption {
    margin-top: .55rem;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    color: var(--ink-soft, #6c6286);
}

/* ---------- phones ---------- */
@media (max-width: 560px) {
    .prose .bdb-buttons { flex-direction: column; align-items: stretch; }
    .prose .bdb-buttons .btn { justify-content: center; text-align: center; }
    .prose .bdk-takeaways, .prose .bdb-contact, .prose .bdb-callout, .prose blockquote.bdb-quote { padding: 1rem 1.05rem; }
    .prose .bdb-callout, .prose blockquote.bdb-quote { border-left-width: 6px; }
    .prose .bdb-cta { padding: 1.15rem 1.1rem; border-left-width: 6px; }
    .prose .bdb-quote .bdb-quote-text { font-size: 1.1rem; }
    .prose figure.bdb-figure img { border-width: 4px; border-radius: var(--r, 22px); }
}

/* ---------- print: no shadows, no colour fills that waste ink ---------- */
@media print {
    .prose .bdk-takeaways, .prose .bdb-contact, .prose .bdb-cta, .prose .bdb-callout, .prose blockquote.bdb-quote,
    .prose .bdb-fact, .prose figure.bdb-figure img { box-shadow: none; }
    .prose .bdb-cta { background: #fff; }
}
