/*
 * Building blocks for pages, blog posts and tutorials (XenoLink editor: Blocks and Style menus).
 * Only these class names survive the filter (xenolink_allowed_classes() in xenolink/xenolink.php).
 * Also loaded inside the editor (xenolink/assets/blocks-editor.js), so you see the same there.
 */

/* Alignment */
.blk-left { text-align: left; }
.blk-center { text-align: center; }
.blk-right { text-align: right; }
img.blk-left { float: left; margin: 4px 20px 12px 0; }
img.blk-right { float: right; margin: 4px 0 12px 20px; }
img.blk-center { display: block; float: none; margin: 12px auto; }

/* Text colours and sizes */
.blk-purple { color: var(--purple, #741bff); }
.blk-muted { color: #6c6f7a; }
.blk-green { color: #087443; }
.blk-orange { color: #b45f06; }
.blk-red { color: #b42318; }
.blk-lead { font-size: 1.25em; line-height: 1.55; }
.blk-small { font-size: 0.85em; }

/* Boxes */
.blk-callout {
    --blk-accent: var(--purple, #741bff);
    margin: 22px 0;
    padding: 14px 20px;
    border: 1px solid color-mix(in srgb, var(--blk-accent) 25%, #fff);
    border-left: 5px solid var(--blk-accent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--blk-accent) 7%, #fff);
}

.blk-callout > :first-child { margin-top: 0; }
.blk-callout > :last-child { margin-bottom: 0; }
.blk-callout.blk-info { --blk-accent: #2563eb; }
.blk-callout.blk-tip { --blk-accent: var(--purple, #741bff); }
.blk-callout.blk-warn { --blk-accent: #d97706; }
.blk-callout.blk-ok { --blk-accent: #087443; }

/* Buttons */
a.blk-button {
    display: inline-block;
    margin: 4px 0;
    padding: 11px 22px;
    border: 2px solid var(--purple, #741bff);
    border-radius: 9px;
    background: var(--purple, #741bff);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

a.blk-button:hover { filter: brightness(1.12); text-decoration: none; }
a.blk-button.blk-outline { background: transparent; color: var(--purple, #741bff); }
a.blk-button.blk-outline:hover { background: color-mix(in srgb, var(--purple, #741bff) 10%, transparent); filter: none; }

/* The divider with the little triangle, as on the homepage */
hr.blk-divider {
    position: relative;
    max-width: 760px;
    height: 13px;
    margin: 40px auto;
    border: 0;
    background:
        linear-gradient(90deg, rgba(116, 27, 255, 0), var(--purple, #741bff)) left center / calc(50% - 24px) 2px no-repeat,
        linear-gradient(90deg, var(--purple, #741bff), rgba(116, 27, 255, 0)) right center / calc(50% - 24px) 2px no-repeat;
    overflow: visible;
}

hr.blk-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-bottom: 13px solid var(--purple, #741bff);
}

/* Quote */
blockquote.blk-quote {
    margin: 26px 0;
    padding: 6px 0 6px 22px;
    border-left: 4px solid var(--purple, #741bff);
    font-size: 1.15em;
    font-style: italic;
    color: #3b3d4a;
}

blockquote.blk-quote > :first-child { margin-top: 0; }
blockquote.blk-quote > :last-child { margin-bottom: 0; }

/* Columns, cards, image + text, hero */
.blk-cols,
.blk-cards,
.blk-media {
    display: grid;
    gap: 24px;
    margin: 28px 0;
}

.blk-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blk-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blk-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.blk-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; }
.blk-media-right > :first-child { order: 2; }

.blk-col > :first-child,
.blk-card > :first-child { margin-top: 0; }
.blk-col > :last-child,
.blk-card > :last-child { margin-bottom: 0; }
.blk-media img { display: block; max-width: 100%; height: auto; border-radius: 12px; }

.blk-card {
    padding: 20px 22px;
    border: 1px solid color-mix(in srgb, var(--purple, #741bff) 22%, #fff);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(20, 16, 40, 0.06);
}

.blk-hero {
    margin: 32px 0;
    padding: 40px 28px;
    border: 1px solid color-mix(in srgb, var(--purple, #741bff) 22%, #fff);
    border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--purple, #741bff) 14%, #fff), #fff 70%);
    text-align: center;
}

.blk-hero > :first-child { margin-top: 0; }
.blk-hero > :last-child { margin-bottom: 0; }

@media (max-width: 700px) {
    .blk-cols-2,
    .blk-cols-3,
    .blk-media { grid-template-columns: minmax(0, 1fr); }
    .blk-media-right > :first-child { order: 0; }
    .blk-hero { padding: 28px 18px; }
}

/* Code blocks (Blocks > Code block...). assets/js/code-blocks.js turns pre.blk-code into .blk-codebox. */
pre.blk-code,
.blk-codebox {
    --code-bg: #14121f;
    --code-ink: #e6e1f5;
    --code-dim: #6f6a8a;
    margin: 22px 0;
    border-radius: 10px;
    background: var(--code-bg);
    color: var(--code-ink);
    font: 13.5px/1.65 Consolas, 'Courier New', monospace;
}
pre.blk-code {
    position: relative;
    padding: 34px 18px 14px;
    overflow-x: auto;
    white-space: pre;
    tab-size: 4;
}
pre.blk-code::before {
    content: attr(data-lang);
    position: absolute;
    top: 8px;
    left: 18px;
    color: var(--code-dim);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.blk-codebox { overflow: hidden; }
.blk-codebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px 7px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.blk-codelang { color: var(--code-dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.blk-codecopy {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: transparent;
    color: var(--code-ink);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.blk-codecopy:hover { background: rgba(255, 255, 255, 0.09); }
.blk-codecopy.is-done { border-color: #5ad19a; color: #5ad19a; }
.blk-codepre { margin: 0; padding: 12px 0; overflow-x: auto; white-space: pre; tab-size: 4; outline: none; }
.blk-codepre code { display: block; width: max-content; min-width: 100%; font: inherit; counter-reset: ln; }
.blk-codepre .cl { display: block; min-height: 1.65em; padding-right: 18px; }
.blk-codepre .cl::before {
    content: counter(ln);
    counter-increment: ln;
    position: sticky;
    left: 0;
    display: inline-block;
    width: 3.2em;
    margin-right: 14px;
    padding-right: 10px;
    background: var(--code-bg);
    color: var(--code-dim);
    text-align: right;
    user-select: none;
}
.blk-codepre .t-c { color: #7f7b9a; font-style: italic; }
.blk-codepre .t-s { color: #8fdcb0; }
.blk-codepre .t-n { color: #f0b072; }
.blk-codepre .t-k { color: #c39bff; }
.blk-codepre .t-f { color: #7fc4ff; }
.blk-codepre .t-v { color: #ff9ec1; }
.blk-codepre .t-p { color: #ffd479; }
.blk-codecopy-area { position: fixed; top: 0; left: -9999px; }

/*
 * Extra styles (2026-10): list styles, heading accents, badges, inline marks, more boxes,
 * buttons, dividers, tables, spec list, FAQ, download card, figure and stat blocks.
 * All new class names, so existing content does not change.
 */
:root {
    --blk-tri-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='12'%3E%3Cpath d='M0 0L10 6L0 12z' fill='%23741bff'/%3E%3C/svg%3E");
}

/* Bullet lists (Style > List style) */
ul.blk-list { padding-left: 0; list-style: none; }
ul.blk-list > li { position: relative; padding-left: 1.6em; }
ul.blk-list > li::before { content: ""; position: absolute; left: 0.2em; }
ul.blk-tri > li::before { top: 0.55em; width: 10px; height: 12px; background: var(--blk-tri-right) no-repeat; }
ul.blk-dot > li::before { top: 0.66em; width: 9px; height: 9px; border-radius: 50%; background: var(--purple, #741bff); }
ul.blk-ring > li::before { top: 0.6em; width: 11px; height: 11px; border: 2.5px solid var(--purple, #741bff); border-radius: 50%; box-sizing: border-box; }
ul.blk-diamond > li::before { top: 0.68em; width: 8px; height: 8px; background: var(--purple, #741bff); transform: rotate(45deg); }
ul.blk-dash > li::before { top: 0.85em; width: 12px; height: 2px; background: var(--purple, #741bff); }
ul.blk-arrow > li::before { content: "\2192"; top: 0; left: 0; color: var(--purple, #741bff); font-weight: 700; }
ul.blk-check > li::before { content: "\2713"; top: 0; left: 0.1em; color: #087443; font-weight: 700; }
ul.blk-cross > li::before { content: "\2715"; top: 0; left: 0.1em; color: #b42318; font-weight: 700; }

/* Numbered lists */
ol.blk-num { padding-left: 0; list-style: none; counter-reset: blk-n; }
ol.blk-num > li { position: relative; padding-left: 2.4em; counter-increment: blk-n; }
ol.blk-num > li::before {
    content: counter(blk-n);
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    background: var(--purple, #741bff);
    color: #fff;
    font-size: 0.82em;
    font-weight: 700;
    line-height: 1.6em;
    text-align: center;
}
ol.blk-num.blk-num-outline > li::before { background: #fff; color: var(--purple, #741bff); box-shadow: inset 0 0 0 2px var(--purple, #741bff); }

/* Steps with a connecting line */
ol.blk-steps { padding-left: 0; list-style: none; counter-reset: blk-s; }
ol.blk-steps > li { position: relative; margin: 0; padding: 0 0 1em 3em; counter-increment: blk-s; }
ol.blk-steps > li + li { margin-top: 0; }
ol.blk-steps > li::before {
    content: counter(blk-s);
    position: absolute;
    left: 0;
    top: 0;
    width: 2em;
    height: 2em;
    border-radius: 8px;
    background: #f1e9ff;
    color: #5a14c7;
    font-size: 0.9em;
    font-weight: 700;
    line-height: 2em;
    text-align: center;
}
ol.blk-steps > li::after { content: ""; position: absolute; left: 0.88em; top: 2.1em; bottom: 0.2em; width: 2px; background: linear-gradient(var(--purple, #741bff), rgba(116, 27, 255, 0.1)); }
ol.blk-steps > li:last-child { padding-bottom: 0; }
ol.blk-steps > li:last-child::after { display: none; }
ol.blk-steps > li > strong:first-child { display: block; }

/* Heading accents (Style > Heading style) and the small line above a heading */
.blk-h-bar { padding-left: 14px; border-left: 4px solid var(--purple, #741bff); }
.blk-h-line { padding-bottom: 10px; background: linear-gradient(90deg, var(--purple, #741bff), rgba(116, 27, 255, 0)) left bottom / 100% 2px no-repeat; }
.blk-h-tri::before { content: ""; display: inline-block; width: 0.5em; height: 0.6em; margin-right: 0.4em; background: var(--blk-tri-right) center / contain no-repeat; vertical-align: 0.05em; }
p.blk-eyebrow { margin-bottom: 4px; color: var(--purple, #741bff); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
p.blk-eyebrow + h2,
p.blk-eyebrow + h3 { margin-top: 0; }

/* Badges */
.blk-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #f1e9ff; color: #5a14c7; font-size: 12px; font-weight: 700; line-height: 1.6; vertical-align: 0.15em; }
.blk-badge.blk-solid { background: var(--purple, #741bff); color: #fff; }
.blk-badge.blk-b-green { background: #e3f6ec; color: #087443; }
.blk-badge.blk-b-orange { background: #fdf0dc; color: #b45f06; }
.blk-badge.blk-b-red { background: #fde7e5; color: #b42318; }
.blk-badge.blk-b-dark { background: #14121f; color: #e6e1f5; }
.blk-badge.blk-tag { border-radius: 6px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--purple, #741bff); color: var(--purple, #741bff); }

/* Keyboard key, highlighter, inline code */
kbd.blk-kbd { display: inline-block; padding: 1px 7px; border: 1px solid #d5d2e2; border-bottom-width: 3px; border-radius: 6px; background: #faf9fd; color: #3b3d4a; font: 600 0.82em/1.4 Consolas, 'Courier New', monospace; }
mark.blk-mark { padding: 0 3px; background: linear-gradient(transparent 55%, #e2d0ff 55%); color: inherit; }
code.blk-inline { padding: 2px 6px; border-radius: 5px; background: #f1e9ff; color: #5a14c7; font: 0.86em Consolas, 'Courier New', monospace; }

/* More boxes: title line, danger, dark */
.blk-callout.blk-danger { --blk-accent: #b42318; }
.blk-callout.blk-dark { --blk-accent: #741bff; border-color: #2a2540; border-left-color: #741bff; background: #14121f; color: #e6e1f5; }
.blk-callout.blk-dark a { color: #c39bff; }
p.blk-callout-title { margin-bottom: 4px; color: var(--blk-accent, var(--purple, #741bff)); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.blk-callout.blk-dark p.blk-callout-title { color: #c39bff; }

/* More buttons */
a.blk-button.blk-btn-small { padding: 7px 14px; font-size: 14px; }
a.blk-button.blk-dark { border-color: #14121f; background: #14121f; }
a.blk-button.blk-download::before { content: "\2193"; margin-right: 8px; }
a.blk-link-arrow { color: var(--purple, #741bff); font-weight: 700; text-decoration: none; }
a.blk-link-arrow::after { content: " \2192"; }
a.blk-link-arrow:hover { text-decoration: underline; }

/* Pull quote */
blockquote.blk-pull { position: relative; margin: 40px 0 28px; padding: 26px 20px 4px; border: 0; color: var(--ink, #10111b); font-size: 1.3em; font-style: normal; font-weight: 700; letter-spacing: -0.02em; line-height: 1.4; text-align: center; }
blockquote.blk-pull::before { content: "\201C"; position: absolute; left: 50%; top: -14px; transform: translateX(-50%); color: var(--purple, #741bff); font: 700 64px/1 Georgia, serif; }
blockquote.blk-pull > p { margin: 0; }
blockquote.blk-pull > :first-child { margin-top: 0; }
blockquote.blk-pull > :last-child { margin-bottom: 0; }
blockquote.blk-pull p.blk-pull-by { margin-top: 10px; color: var(--muted, #626477); font-size: 0.62em; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; }
/* Inside the editor TinyMCE adds its own quote line; keep the pull quote clean there too. */
.mce-content-body blockquote.blk-pull { margin-left: 0; padding-left: 20px; border-left: 0; }

/* More dividers */
hr.blk-hr-plain { border: 0; height: 2px; margin: 36px 0; background: linear-gradient(90deg, rgba(116, 27, 255, 0), var(--purple, #741bff), rgba(116, 27, 255, 0)); }
hr.blk-hr-dots { border: 0; width: 66px; height: 14px; margin: 36px auto; background: radial-gradient(circle, var(--purple, #741bff) 3px, transparent 3.5px) center / 22px 14px repeat-x; }
hr.blk-hr-tris { border: 0; width: 60px; height: 13px; margin: 36px auto; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='13'%3E%3Cpath d='M10 2L16 12H4z' fill='%23741bff'/%3E%3C/svg%3E") center / 20px 13px repeat-x; }
hr.blk-hr-dashed { height: 0; margin: 36px 0; border: 0; border-top: 2px dashed #d7c4ff; background: none; }

/* Tables */
.blk-table-wrap { margin: 24px 0; overflow-x: auto; }
table.blk-table { width: 100%; border: 1px solid var(--line, #e7e5ef); border-collapse: separate; border-spacing: 0; border-radius: 10px; font-size: 0.92em; line-height: 1.5; overflow: hidden; }
table.blk-table th { padding: 9px 14px; background: var(--purple, #741bff); color: #fff; font-size: 0.85em; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
table.blk-table td { padding: 9px 14px; border-top: 1px solid var(--line, #e7e5ef); vertical-align: top; }
table.blk-table tr:nth-child(even) td { background: #faf8ff; }
table.blk-table.blk-table-dark { border-color: #2a2540; }
table.blk-table.blk-table-dark th { background: #14121f; color: #c39bff; }

/* Spec list */
dl.blk-specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 24px 0; border-top: 1px solid var(--line, #e7e5ef); }
dl.blk-specs dt,
dl.blk-specs dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line, #e7e5ef); }
dl.blk-specs dt { padding-right: 24px; color: var(--muted, #626477); font-size: 0.85em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
dl.blk-specs dd { font-weight: 700; }

/* FAQ (fold-out question) */
details.blk-faq { margin: 0 0 10px; border: 1px solid var(--line, #e7e5ef); border-radius: 10px; background: #fff; }
details.blk-faq[open] { border-color: #d7c4ff; }
details.blk-faq > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; font-weight: 700; list-style: none; cursor: pointer; }
details.blk-faq > summary::-webkit-details-marker { display: none; }
details.blk-faq > summary::after { content: ""; flex: 0 0 10px; height: 12px; background: var(--blk-tri-right) no-repeat; transition: transform 0.2s ease; }
details.blk-faq[open] > summary::after { transform: rotate(90deg); }
details.blk-faq > :not(summary) { margin: 0; padding: 0 16px 12px; color: var(--muted, #626477); }
details.blk-faq + :not(details) { margin-top: 22px; }

/* Download card */
.blk-file { display: flex; align-items: center; gap: 16px; margin: 22px 0; padding: 14px 16px; border: 1px solid #e3d6ff; border-radius: 12px; background: #fff; line-height: 1.35; }
.blk-file-icon { flex: 0 0 46px; height: 46px; border-radius: 10px; background: #f1e9ff; color: var(--purple, #741bff); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; line-height: 46px; text-align: center; text-transform: uppercase; }
.blk-file-meta { flex: 1 1 auto; min-width: 0; }
.blk-file-meta strong { display: block; overflow-wrap: anywhere; }
.blk-file-info { display: block; color: var(--muted, #626477); font-size: 13px; }
.blk-file a.blk-button { margin: 0; }

/* Image with caption */
figure.blk-figure { margin: 28px 0; }
figure.blk-figure img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; border-radius: 10px; }
figure.blk-figure figcaption { display: flex; gap: 8px; margin-top: 8px; color: var(--muted, #626477); font-size: 13px; line-height: 1.5; }
figure.blk-figure figcaption::before { content: ""; flex: 0 0 9px; height: 11px; margin-top: 4px; background: var(--blk-tri-right) center / 9px 11px no-repeat; }

/* Stat blocks */
.blk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 24px 0; }
.blk-stat { padding: 12px 14px; border: 1px solid #ece3ff; border-radius: 12px; background: #faf8ff; line-height: 1.4; text-align: center; }
.blk-stat strong { display: block; color: var(--purple, #741bff); font-size: 28px; letter-spacing: -0.04em; line-height: 1.1; }
.blk-stat-label { color: var(--muted, #626477); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 700px) {
    .blk-file { flex-wrap: wrap; }
    .blk-file a.blk-button { width: 100%; text-align: center; }
    dl.blk-specs { grid-template-columns: minmax(0, 1fr); }
    dl.blk-specs dt { padding-bottom: 0; border-bottom: 0; }
}

/* Icons and emoticons (XenoLink editor: Icons and Emoticons buttons).
   Icons: /assets/icons/<name>.svg, purple; the button styles turn them white. */
img.blk-emoji { display: inline-block; width: 1.5em; height: 1.5em; margin: 0 .08em; vertical-align: -.38em; }
img.blk-emoji.blk-emoji-lg { width: 3em; height: 3em; vertical-align: middle; }
.blk-social {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    margin: 2px .3em 2px 0;
    color: var(--purple, #741bff);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    vertical-align: middle;
}
a.blk-social:hover { text-decoration: underline; }
.blk-social img.blk-icon { display: block; flex: none; width: 1.5em; height: 1.5em; margin: 0; }
.blk-social.blk-icon-sm img.blk-icon { width: 1.1em; height: 1.1em; }
.blk-social.blk-icon-lg img.blk-icon { width: 2.4em; height: 2.4em; }
.blk-social.blk-icon-tile,
.blk-social.blk-icon-dark,
.blk-social.blk-icon-round,
.blk-social.blk-icon-outline {
    padding: .5em;
    border: 2px solid var(--purple, #741bff);
    border-radius: 9px;
    background: var(--purple, #741bff);
    color: #fff;
}
.blk-social.blk-icon-dark { border-color: #14121f; background: #14121f; }
.blk-social.blk-icon-round { border-radius: 999px; }
.blk-social.blk-icon-outline { background: transparent; color: var(--purple, #741bff); }
.blk-social.blk-icon-tile img.blk-icon,
.blk-social.blk-icon-dark img.blk-icon,
.blk-social.blk-icon-round img.blk-icon { filter: brightness(0) invert(1); }
a.blk-social.blk-icon-tile:hover,
a.blk-social.blk-icon-dark:hover,
a.blk-social.blk-icon-round:hover { filter: brightness(1.15); text-decoration: none; }
a.blk-social.blk-icon-outline:hover { background: color-mix(in srgb, var(--purple, #741bff) 10%, transparent); text-decoration: none; }
