/**
 * Interactive blocks for blog posts (tb-*), enhanced by assets/js/blog-blocks.js.
 *
 * Authors put the markup in a Custom HTML block. Every block reads as plain
 * content until the script adds .is-ready. Blocks: tb-flip, tb-quiz, tb-tree,
 * tb-template, tb-compare, tb-chat, tb-timeline, tb-story, tb-chart,
 * tb-checklist, tb-cart, tb-calc, tb-annotate (markup examples are in
 * tasks/editorial-brief.md at the repo root; the class names below are the contract).
 */

.post-content {
    --tb-cobalt: #120899;
    --tb-azure: #3862F9;
    --tb-teal: #3bedcb;
    --tb-violet: #7948E5;
    --tb-green: #5DED9A;
    --tb-ink: #1a1a2e;
    --tb-steel: #5b6078;
    --tb-mist: #F0F2FA;
    --tb-paper: #FAFAFC;
    --tb-line: #dde1f0;
    --tb-bad: #b42318;
    --tb-bad-bg: #fdecea;
    --tb-mid: #8a5a00;
    --tb-mid-bg: #fff4dc;
    --tb-good: #0b6b46;
    --tb-good-bg: #e3f7ee;
    --tb-radius: 14px;
    --tb-sticky-top: 96px;
}

.post-content [class^="tb-"] p:last-child,
.post-content [class*=" tb-"] p:last-child {
    margin-bottom: 0;
}

.post-content .tb-flip,
.post-content .tb-quiz,
.post-content .tb-tree,
.post-content .tb-template,
.post-content .tb-compare,
.post-content .tb-chat,
.post-content .tb-timeline,
.post-content .tb-story,
.post-content .tb-chart,
.post-content .tb-checklist,
.post-content .tb-cart,
.post-content .tb-calc,
.post-content .tb-annotate {
    margin: 2.25rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.post-content .tb-flip button,
.post-content .tb-quiz button,
.post-content .tb-tree button,
.post-content .tb-template button,
.post-content .tb-compare button,
.post-content .tb-timeline-ics,
.post-content .tb-checklist button,
.post-content .tb-cart button,
.post-content .tb-annotate button {
    font: inherit;
    cursor: pointer;
}

.post-content [class^="tb-"] button:focus-visible,
.post-content [class*=" tb-"] button:focus-visible,
.post-content .tb-flip-card:focus-visible,
.post-content .tb-cart-item:focus-visible {
    outline: 3px solid var(--tb-azure);
    outline-offset: 2px;
}

/* Shared small button */
.post-content .tb-btn,
.post-content .tb-template-copy,
.post-content .tb-tree-restart,
.post-content .tb-compare-reveal,
.post-content .tb-timeline-ics,
.post-content .tb-checklist-reset {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1px solid var(--tb-cobalt);
    border-radius: 999px;
    background: #fff;
    color: var(--tb-cobalt);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
    transition: background .15s ease, color .15s ease;
}

.post-content .tb-template-copy:hover,
.post-content .tb-tree-restart:hover,
.post-content .tb-compare-reveal:hover,
.post-content .tb-timeline-ics:hover,
.post-content .tb-checklist-reset:hover {
    background: var(--tb-cobalt);
    color: #fff;
}

/* ------------------------------------------------------------------ flip */
.post-content .tb-flip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.post-content .tb-flip-card {
    position: relative;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
    border: 1px solid var(--tb-line);
    padding: 1.25rem;
}

.post-content .tb-flip-back {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--tb-line);
}

.post-content .tb-flip.is-ready .tb-flip-card {
    display: grid;
    min-height: 210px;
    padding: 0;
    border: 0;
    background: none;
    perspective: 1200px;
}

.post-content .tb-flip.is-ready:not([data-guess]) .tb-flip-card {
    cursor: pointer;
}

.post-content .tb-flip.is-ready .tb-flip-front,
.post-content .tb-flip.is-ready .tb-flip-back {
    grid-area: 1 / 1;
    margin: 0;
    padding: 1.25rem;
    border: 1px solid var(--tb-line);
    border-radius: var(--tb-radius);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform .5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .75rem;
}

.post-content .tb-flip.is-ready .tb-flip-front {
    background: linear-gradient(135deg, var(--tb-cobalt) 0%, var(--tb-azure) 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
}

.post-content .tb-flip.is-ready .tb-flip-front a {
    color: #fff;
}

.post-content .tb-flip.is-ready .tb-flip-back {
    background: #fff;
    transform: rotateY(180deg);
    font-size: .95rem;
}

.post-content .tb-flip.is-ready .tb-flip-card.is-flipped .tb-flip-front {
    transform: rotateY(-180deg);
}

.post-content .tb-flip.is-ready .tb-flip-card.is-flipped .tb-flip-back {
    transform: rotateY(0);
}

.post-content .tb-flip-card.is-right .tb-flip-back {
    border-color: var(--tb-good);
    box-shadow: inset 0 4px 0 var(--tb-good);
}

.post-content .tb-flip-card.is-wrong .tb-flip-back {
    border-color: var(--tb-bad);
    box-shadow: inset 0 4px 0 var(--tb-bad);
}

.post-content .tb-flip-guess {
    display: flex;
    gap: .5rem;
    margin-top: auto;
}

.post-content .tb-flip-btn {
    flex: 1;
    padding: .45rem .75rem;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-weight: 600;
}

.post-content .tb-flip-btn:hover {
    background: #fff;
    color: var(--tb-cobalt);
}

.post-content .tb-flip-score {
    grid-column: 1 / -1;
    margin: 0;
    font-weight: 600;
    color: var(--tb-cobalt);
}

@media (prefers-reduced-motion: reduce) {
    .post-content .tb-flip.is-ready .tb-flip-front,
    .post-content .tb-flip.is-ready .tb-flip-back {
        transition: none;
    }
}

/* ------------------------------------------------------------------ quiz */
.post-content .tb-quiz {
    padding: 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
}

.post-content .tb-quiz-progress {
    margin: 0 0 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--tb-steel);
}

.post-content .tb-quiz-q {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--tb-line);
}

.post-content .tb-quiz-question {
    margin: 0 0 .75rem;
    font-weight: 700;
    color: var(--tb-ink);
}

.post-content .tb-quiz-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .5rem;
}

.post-content .tb-quiz-options li {
    margin: 0;
    padding: 0;
}

.post-content .tb-quiz-options li::before {
    display: none;
}

.post-content .tb-quiz-option {
    width: 100%;
    text-align: left;
    padding: .65rem .9rem;
    border: 1px solid var(--tb-line);
    border-radius: 10px;
    background: var(--tb-paper);
    color: var(--tb-ink);
    transition: border-color .15s ease, background .15s ease;
}

.post-content .tb-quiz-option:hover {
    border-color: var(--tb-azure);
}

.post-content .tb-quiz-option.is-selected {
    border-color: var(--tb-cobalt);
    background: #e9ecff;
    font-weight: 600;
}

.post-content .tb-quiz.is-ready .tb-quiz-explain {
    display: none;
}

.post-content .tb-quiz.is-ready .tb-quiz-q.is-answered .tb-quiz-explain {
    display: block;
    margin: .75rem 0 0;
    font-size: .92rem;
    color: var(--tb-steel);
}

.post-content .tb-quiz-rate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    font-weight: 600;
}

.post-content .tb-quiz-rate input {
    width: 6rem;
    padding: .45rem .6rem;
    border: 1px solid var(--tb-line);
    border-radius: 8px;
    font: inherit;
}

.post-content .tb-quiz.is-ready .tb-quiz-result {
    display: none;
}

.post-content .tb-quiz.is-ready .tb-quiz-result.is-shown {
    display: block;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--tb-cobalt) 0%, var(--tb-azure) 100%);
    color: #fff;
}

.post-content .tb-quiz-result.is-shown a,
.post-content .tb-quiz-result.is-shown strong {
    color: #fff;
}

/* ------------------------------------------------------------------ tree */
.post-content .tb-tree {
    padding: 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
    scroll-margin-top: var(--tb-sticky-top);
}

.post-content .tb-tree-node {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--tb-line);
}

.post-content .tb-tree.is-ready .tb-tree-node {
    display: none;
    padding: 0;
    border: 0;
}

.post-content .tb-tree.is-ready .tb-tree-node.is-current {
    display: block;
}

.post-content .tb-tree-question {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tb-ink);
}

.post-content .tb-tree-question:focus {
    outline: none;
}

.post-content .tb-tree-option {
    display: inline-block;
    margin: 0 .5rem .5rem 0;
    padding: .65rem 1.1rem;
    border: 1px solid var(--tb-cobalt);
    border-radius: 10px;
    background: #fff;
    color: var(--tb-cobalt);
    font-weight: 600;
    text-align: left;
}

.post-content .tb-tree-option:hover {
    background: var(--tb-cobalt);
    color: #fff;
}

.post-content .tb-tree-result {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: #fff;
    border-left: 4px solid var(--tb-teal);
}

.post-content .tb-tree.is-ready .tb-tree-result.is-current {
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--tb-teal);
}

.post-content .tb-tree-result h3 {
    margin-top: 0;
}

.post-content .tb-tree-trail {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    font-size: .85rem;
}

.post-content .tb-tree-trail:empty {
    display: none;
}

.post-content .tb-tree-trail li {
    margin: 0;
    padding: .25rem .65rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--tb-line);
    color: var(--tb-steel);
}

.post-content .tb-tree-trail li::before {
    display: none;
}

.post-content .tb-tree-trail-q {
    display: none;
}

.post-content .tb-tree-trail strong {
    color: var(--tb-cobalt);
}

.post-content .tb-tree-restart {
    margin-top: 1rem;
}

/* -------------------------------------------------------------- template */
.post-content .tb-template {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-radius: var(--tb-radius);
    border: 1px solid var(--tb-line);
    background: #fff;
    box-shadow: 0 4px 18px rgba(18, 8, 153, .06);
}

.post-content .tb-template-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tb-cobalt);
    padding-right: 7rem;
}

.post-content .tb-template-when {
    margin: .25rem 0 1rem;
    font-size: .9rem;
    color: var(--tb-steel);
}

.post-content .tb-template-copy {
    position: absolute;
    top: 1.1rem;
    right: 1.25rem;
}

.post-content .tb-template-copy.is-done {
    background: var(--tb-good);
    border-color: var(--tb-good);
    color: #fff;
}

.post-content .tb-template-body {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: var(--tb-paper);
    border: 1px dashed var(--tb-line);
    font-size: .98rem;
}

.post-content .tb-template-body p {
    margin: 0 0 .75rem;
}

.post-content .tb-template-body mark {
    background: #e6fbf6;
    color: #0a5c4c;
    padding: 0 .2em;
    border-radius: 4px;
}

.post-content .tb-template-tip {
    margin: 1rem 0 0;
    font-size: .9rem;
    color: var(--tb-steel);
}

/* --------------------------------------------------------------- compare */
.post-content .tb-compare {
    display: grid;
    gap: 1rem;
}

.post-content .tb-compare-tabs {
    display: none;
}

.post-content .tb-compare-item {
    padding: 1.25rem;
    border-radius: var(--tb-radius);
    border: 1px solid var(--tb-line);
    background: #fff;
    border-top: 5px solid var(--tb-steel);
}

.post-content .tb-compare-item[data-tone="bad"] { border-top-color: var(--tb-bad); }
.post-content .tb-compare-item[data-tone="mid"] { border-top-color: #d99a00; }
.post-content .tb-compare-item[data-tone="good"] { border-top-color: var(--tb-good); }

.post-content .tb-compare-label {
    display: inline-block;
    margin: 0 0 .75rem;
    padding: .2rem .7rem;
    border-radius: 999px;
    background: var(--tb-mist);
    font-size: .85rem;
    font-weight: 700;
    color: var(--tb-ink);
}

.post-content .tb-compare-item[data-tone="bad"] .tb-compare-label { background: var(--tb-bad-bg); color: var(--tb-bad); }
.post-content .tb-compare-item[data-tone="mid"] .tb-compare-label { background: var(--tb-mid-bg); color: var(--tb-mid); }
.post-content .tb-compare-item[data-tone="good"] .tb-compare-label { background: var(--tb-good-bg); color: var(--tb-good); }

.post-content .tb-compare-body {
    font-size: .97rem;
}

.post-content .tb-compare-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--tb-line);
    font-size: .92rem;
    color: var(--tb-steel);
}

.post-content .tb-compare-reveal {
    margin-top: 1rem;
}

@media (min-width: 900px) {
    .post-content .tb-compare.is-ready {
        grid-template-columns: repeat(var(--tb-cols, 2), minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .post-content .tb-compare.is-ready .tb-compare-tabs {
        display: flex;
        gap: .4rem;
        overflow-x: auto;
    }

    .post-content .tb-compare-tab {
        flex: 1 0 auto;
        padding: .5rem .9rem;
        border: 1px solid var(--tb-line);
        border-radius: 999px;
        background: #fff;
        color: var(--tb-ink);
        font-weight: 600;
        font-size: .9rem;
    }

    .post-content .tb-compare-tab[aria-selected="true"] {
        background: var(--tb-cobalt);
        border-color: var(--tb-cobalt);
        color: #fff;
    }

    .post-content .tb-compare.is-ready .tb-compare-item {
        display: none;
    }

    .post-content .tb-compare.is-ready .tb-compare-item.is-active {
        display: block;
    }
}

/* ------------------------------------------------------------------ chat */
.post-content .tb-chat {
    --tb-chat: var(--tb-azure);
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem 1.25rem;
    border-radius: 22px;
    background: #eef1f7;
    border: 1px solid var(--tb-line);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    overflow: hidden;
}

.post-content .tb-chat[data-channel="viber"] { --tb-chat: #7360f2; }
.post-content .tb-chat[data-channel="whatsapp"] { --tb-chat: #1f8f5f; }
.post-content .tb-chat[data-channel="messenger"] { --tb-chat: #2f6bff; }
.post-content .tb-chat[data-channel="email"] { --tb-chat: #5b6078; }
.post-content .tb-chat[data-channel="sms"] { --tb-chat: #3a7d44; }
.post-content .tb-chat[data-channel="web"] { --tb-chat: var(--tb-cobalt); }

.post-content .tb-chat::before {
    content: attr(data-title);
    display: block;
    margin: 0 -1rem .5rem;
    padding: .75rem 1rem;
    background: var(--tb-chat);
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
}

.post-content .tb-msg {
    position: relative;
    max-width: 82%;
    margin: 0;
    padding: .55rem .8rem 1.2rem;
    border-radius: 16px;
    font-size: .95rem;
    line-height: 1.45;
}

.post-content .tb-msg::after {
    content: attr(data-time);
    position: absolute;
    right: .7rem;
    bottom: .25rem;
    font-size: .7rem;
    opacity: .7;
}

.post-content .tb-msg-in {
    align-self: flex-start;
    background: #fff;
    color: var(--tb-ink);
    border-bottom-left-radius: 4px;
}

.post-content .tb-msg-out {
    align-self: flex-end;
    background: var(--tb-chat);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.post-content .tb-msg-out a {
    color: #fff;
}

.post-content .tb-msg-note {
    align-self: center;
    margin: .25rem 0;
    padding: .2rem .7rem;
    border-radius: 999px;
    background: rgba(26, 26, 46, .08);
    font-size: .78rem;
    color: var(--tb-steel);
}

/* -------------------------------------------------------------- timeline */
.post-content .tb-timeline {
    list-style: none;
    margin-left: 0;
    padding: 0 0 0 1.75rem;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, #120899, #3862f9, #2f9ae8, #3bedcb, #5ded9a) 1;
}

.post-content .tb-timeline-item {
    position: relative;
    margin: 0 0 1.75rem;
    padding: 0;
}

.post-content .tb-timeline-item::before {
    content: attr(data-label);
    display: inline-block;
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 .4rem;
    padding: .15rem .75rem;
    border-radius: 999px;
    background: var(--tb-cobalt);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}

.post-content .tb-timeline-item::after {
    content: "";
    position: absolute;
    left: calc(-1.75rem - 8px);
    top: .3rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--tb-azure);
}

.post-content .tb-timeline-title {
    margin: 0 0 .35rem;
    font-weight: 700;
    color: var(--tb-ink);
}

.post-content .tb-timeline-ics {
    margin: -1rem 0 2rem;
}

/* ----------------------------------------------------------------- story */
.post-content .tb-story {
    position: relative;
}

.post-content .tb-story-step {
    margin: 0 0 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-paper);
    border: 1px solid var(--tb-line);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.post-content .tb-story-step.is-current {
    border-color: var(--tb-azure);
    box-shadow: 0 6px 24px rgba(56, 98, 249, .12);
}

.post-content .tb-story-stamp {
    display: inline-block;
    margin-bottom: .4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--tb-azure);
}

.post-content .tb-story-title {
    margin: 0 0 .5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tb-ink);
}

.post-content .tb-story-clock {
    position: sticky;
    top: var(--tb-sticky-top);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .6rem;
    width: max-content;
    margin: 0 0 1rem auto;
    padding: .4rem .9rem .4rem .5rem;
    border-radius: 999px;
    background: var(--tb-cobalt);
    color: #fff;
    box-shadow: 0 6px 18px rgba(18, 8, 153, .25);
}

.post-content .tb-story-face {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--tb-teal);
}

.post-content .tb-story-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 2px;
    height: 9px;
    margin-left: -1px;
    background: #fff;
    transform-origin: 50% 100%;
    transition: transform .4s ease;
}

.post-content .tb-story-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.post-content .tb-story:not(.is-ready) .tb-story-clock {
    display: none;
}

/* ----------------------------------------------------------------- chart */
.post-content .tb-chart {
    padding: 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
}

.post-content .tb-chart-title {
    margin: 0 0 1rem;
    font-weight: 700;
    color: var(--tb-ink);
}

.post-content .tb-chart ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-content .tb-chart li {
    position: relative;
    margin: 0 0 .75rem;
    padding: 0;
}

.post-content .tb-chart li::before {
    display: none;
}

.post-content .tb-chart--bar li {
    padding-bottom: 1.35rem;
}

.post-content .tb-chart--bar li::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 12px;
    width: var(--w, 0);
    border-radius: 999px;
    background: var(--c, var(--tb-cobalt));
}

.post-content .tb-chart-value {
    float: right;
    margin-left: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--tb-ink);
}

.post-content .tb-chart--donut.is-ready {
    display: grid;
    grid-template-columns: 180px 1fr;
    grid-template-areas: "title title" "ring list";
    align-items: center;
    gap: 1.5rem;
}

.post-content .tb-chart--donut .tb-chart-title { grid-area: title; margin: 0; }
.post-content .tb-chart--donut ul { grid-area: list; }

.post-content .tb-chart-donut {
    grid-area: ring;
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.post-content .tb-chart-donut::before {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--tb-mist);
}

.post-content .tb-chart-total {
    position: relative;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--tb-ink);
}

.post-content .tb-chart--donut li {
    padding-left: 1.4rem;
}

.post-content .tb-chart--donut li::after {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: .8rem;
    height: .8rem;
    border-radius: 3px;
    background: var(--c, var(--tb-cobalt));
}

@media (max-width: 600px) {
    .post-content .tb-chart--donut.is-ready {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "ring" "list";
        justify-items: center;
    }

    .post-content .tb-chart--donut ul {
        width: 100%;
    }
}

/* ------------------------------------------------------------- checklist */
.post-content .tb-checklist {
    padding: 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
}

.post-content .tb-checklist-bar {
    height: 10px;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.post-content .tb-checklist-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--tb-cobalt), var(--tb-azure), var(--tb-teal));
    transition: width .3s ease;
}

.post-content .tb-checklist-count {
    margin: .5rem 0 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--tb-steel);
}

.post-content .tb-checklist-group {
    margin: 1.25rem 0 .5rem;
    font-weight: 700;
    color: var(--tb-cobalt);
}

.post-content .tb-checklist ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-content .tb-checklist li {
    margin: 0 0 .4rem;
    padding: 0;
}

.post-content .tb-checklist li::before {
    display: none;
}

.post-content .tb-checklist-item {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    padding: .6rem .8rem;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.post-content .tb-checklist-item input {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: .2rem;
    accent-color: var(--tb-cobalt);
}

.post-content .tb-checklist li.is-done .tb-checklist-item {
    color: var(--tb-steel);
    text-decoration: line-through;
    text-decoration-color: rgba(91, 96, 120, .5);
}

.post-content .tb-checklist-hint {
    display: block;
    font-size: .88rem;
    color: var(--tb-steel);
}

.post-content .tb-checklist-reset {
    margin-top: 1rem;
}

/* ------------------------------------------------------------------ cart */
.post-content .tb-cart {
    padding: 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
}

.post-content .tb-cart-group {
    margin-bottom: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .6rem;
}

.post-content .tb-cart-group-title {
    grid-column: 1 / -1;
    margin: 0;
    font-weight: 700;
    color: var(--tb-cobalt);
}

.post-content .tb-cart-item {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: #fff;
    font-size: .92rem;
    cursor: pointer;
    transition: border-color .15s ease;
}

.post-content .tb-cart-item span {
    color: var(--tb-steel);
}

.post-content .tb-cart-item:hover {
    border-color: var(--tb-line);
}

.post-content .tb-cart-item.is-selected {
    border-color: var(--tb-cobalt);
    background: #eef0ff;
}

.post-content .tb-cart-item .tb-cart-price {
    margin-top: auto;
    font-weight: 700;
    color: var(--tb-cobalt);
}

.post-content .tb-cart-presets {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.post-content .tb-cart-presets button {
    padding: .45rem .9rem;
    border: 1px solid var(--tb-cobalt);
    border-radius: 999px;
    background: #fff;
    color: var(--tb-cobalt);
    font-weight: 600;
}

.post-content .tb-cart-presets button.is-active,
.post-content .tb-cart-presets button:hover {
    background: var(--tb-cobalt);
    color: #fff;
}

.post-content .tb-cart-summary {
    position: sticky;
    bottom: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: var(--tb-cobalt);
    color: #fff;
    box-shadow: 0 8px 24px rgba(18, 8, 153, .25);
}

.post-content .tb-cart-sum {
    margin: 0 0 .5rem;
    font-weight: 700;
}

.post-content .tb-cart-meter {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
}

.post-content .tb-cart-meter span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--tb-teal);
    transition: width .3s ease;
}

.post-content .tb-cart.is-over .tb-cart-summary {
    background: var(--tb-bad);
}

.post-content .tb-cart.is-over .tb-cart-meter span {
    background: #fff;
}

/* ------------------------------------------------------------------ calc */
.post-content .tb-calc {
    padding: 1.5rem;
    border-radius: var(--tb-radius);
    background: var(--tb-mist);
}

.post-content .tb-calc-title {
    margin: 0 0 1rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--tb-ink);
}

.post-content .tb-calc-input {
    margin-bottom: 1rem;
}

.post-content .tb-calc-label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .95rem;
    font-weight: 600;
}

.post-content .tb-calc-value {
    flex: none;
    color: var(--tb-cobalt);
    font-variant-numeric: tabular-nums;
}

.post-content .tb-calc-input input[type="range"] {
    width: 100%;
    margin-top: .35rem;
    accent-color: var(--tb-cobalt);
}

.post-content .tb-calc-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
    margin: 1.25rem 0;
}

.post-content .tb-calc-output {
    padding: .9rem 1rem;
    border-radius: 12px;
    background: #fff;
    border-top: 4px solid var(--tb-teal);
}

.post-content .tb-calc-output.is-negative {
    border-top-color: var(--tb-bad);
}

.post-content .tb-calc-out-label {
    display: block;
    font-size: .85rem;
    color: var(--tb-steel);
}

.post-content .tb-calc-out-value {
    display: block;
    font-size: 1.35rem;
    color: var(--tb-ink);
    font-variant-numeric: tabular-nums;
}

.post-content .tb-calc-output.is-negative .tb-calc-out-value {
    color: var(--tb-bad);
}

.post-content .tb-calc-bar {
    position: relative;
    margin-bottom: .5rem;
    padding: .45rem .75rem;
    border-radius: 8px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .9rem;
    overflow: hidden;
    z-index: 0;
}

.post-content .tb-calc-bar::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w, 0);
    background: var(--c, var(--tb-azure));
    opacity: .18;
    transition: width .3s ease;
    z-index: -1;
}

.post-content .tb-calc-bar-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- annotate */
.post-content .tb-annotate {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .post-content .tb-annotate {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        align-items: start;
    }
}

.post-content .tb-annotate-media {
    position: relative;
}

.post-content .tb-annotate-media img {
    display: block;
    width: 100%;
    border-radius: var(--tb-radius);
}

.post-content .tb-annotate-pin {
    position: absolute;
    z-index: 2;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--tb-cobalt);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(18, 8, 153, .35);
    transition: transform .15s ease, background .15s ease;
}

.post-content .tb-annotate-pin.is-active,
.post-content .tb-annotate-pin:hover {
    background: var(--tb-teal);
    color: var(--tb-cobalt);
    transform: scale(1.15);
}

.post-content .tb-annotate-notes {
    margin: 0;
    padding-left: 0;
}

.post-content .tb-annotate-notes li {
    margin-bottom: .6rem;
    padding: .6rem .8rem .6rem 3.25rem;
    border-radius: 10px;
    font-size: .95rem;
    transition: background .15s ease;
}

.post-content .tb-annotate-notes li::before {
    left: .6rem;
    top: .6rem;
    width: 28px;
    height: 28px;
}

.post-content .tb-annotate-notes li.is-active {
    background: var(--tb-mist);
}

.post-content .tb-annotate-notes strong {
    display: block;
    color: var(--tb-cobalt);
}

/* Mock-up parts for an annotated offer or page */
.post-content .tb-mock {
    border-radius: var(--tb-radius);
    border: 1px solid var(--tb-line);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(18, 8, 153, .1);
    font-size: .9rem;
}

.post-content .tb-mock > *:not(.tb-mock-photo) {
    margin-left: 1rem;
    margin-right: 1rem;
}

.post-content .tb-mock-photo {
    display: grid;
    place-items: end start;
    aspect-ratio: 16 / 8;
    margin: 0 0 .75rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, #3862f9 0%, #2f9ae8 45%, #3bedcb 100%);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
}

.post-content .tb-mock-title {
    margin-top: 0;
    margin-bottom: .25rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tb-ink);
}

.post-content .tb-mock-row {
    margin-top: 0;
    margin-bottom: .35rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--tb-mist);
}

.post-content .tb-mock-price {
    margin: .5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tb-cobalt);
}

.post-content .tb-mock-small {
    font-size: .8rem;
    color: var(--tb-steel);
}

.post-content .tb-mock-btn {
    display: block;
    margin-top: .75rem;
    margin-bottom: 1rem;
    padding: .65rem 1rem;
    border-radius: 10px;
    background: var(--tb-cobalt);
    color: #fff;
    text-align: center;
    font-weight: 700;
}

@media print {
    .post-content .tb-template-copy,
    .post-content .tb-tree-restart,
    .post-content .tb-checklist-reset,
    .post-content .tb-timeline-ics,
    .post-content .tb-annotate-pin {
        display: none;
    }

    .post-content .tb-tree.is-ready .tb-tree-node,
    .post-content .tb-quiz.is-ready .tb-quiz-explain,
    .post-content .tb-compare.is-ready .tb-compare-item {
        display: block;
    }
}
