/* ═══════════════════════════════════════════════════════════════
   TradersPH blog pages (landing_page_v1). Every class starts with tpb-.
   Mobile first. Plan: docs/plan/20261128-site-page-builder/
   ═══════════════════════════════════════════════════════════════ */

.tpb-body {
    --tpb-navy: #1a203d;
    --tpb-p100: #e9eafa;
    --tpb-p200: #c9ccf3;
    --tpb-p600: #1f2ccc;
    --tpb-p800: #161f91;
    --tpb-ink: var(--dark, #0f172a);
    --tpb-muted: var(--gray, #64748b);
    --tpb-line: var(--border-color, #e2e8f0);
    --tpb-wash: #f5f6fd;
    --tpb-accent: var(--tpb-p600);
    --tpb-accent-ink: #ffffff;
    --tpb-accent-soft: var(--tpb-p100);
    --tpb-radius: 1rem;
    --tpb-page: 46rem;
    --tpb-fs: 1.0625rem;
    background: #ffffff;
}

/* Page style tokens */
.tpb-accent-navy  { --tpb-accent: var(--tpb-navy);  --tpb-accent-soft: var(--tpb-p100); }
.tpb-accent-blue  { --tpb-accent: var(--tpb-p600);  --tpb-accent-soft: var(--tpb-p100); }
.tpb-accent-green { --tpb-accent: #23854b;          --tpb-accent-soft: #e3f6ea; }
.tpb-accent-gold  { --tpb-accent: #9a6b00;          --tpb-accent-soft: #fbf1d9; }
.tpb-accent-red   { --tpb-accent: #b42318;          --tpb-accent-soft: #fde8e6; }
.tpb-pw-narrow { --tpb-page: 40rem; }
.tpb-pw-normal { --tpb-page: 46rem; }
.tpb-pw-wide   { --tpb-page: 64rem; }
.tpb-fs-s { --tpb-fs: 1rem; }
.tpb-fs-m { --tpb-fs: 1.0625rem; }
.tpb-fs-l { --tpb-fs: 1.1875rem; }

/* main.css styles bare header and nav elements as the site bar; undo that
   for the semantic header/nav inside blog content. */
.tpb-main header { position: static; padding: 0; z-index: auto; transition: none; }
.tpb-main nav { display: block; }

/* ---------- Page frame ---------- */
.tpb-main {
    padding: 6.5rem 1rem 4rem;
    font-size: var(--tpb-fs);
    color: var(--tpb-ink);
}
.tpb-article, .tpb-list-head, .tpb-post-grid, .tpb-pager, .tpb-error, .tpb-empty {
    max-width: var(--tpb-page);
    margin-left: auto;
    margin-right: auto;
}
.tpb-has-sticky .tpb-main { padding-bottom: 8rem; }

.tpb-draft-bar {
    position: sticky;
    top: 0;
    z-index: 1001;
    padding: 0.6rem 1rem;
    background: #fff4d6;
    color: #6b4e00;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

/* ---------- Hero ---------- */
.tpb-hero { margin-bottom: 2rem; }
.tpb-crumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--tpb-muted);
    margin-bottom: 1rem;
}
.tpb-crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--tpb-line); }
.tpb-crumbs li[aria-current] {
    max-width: 14rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tpb-crumbs a:hover { color: var(--tpb-accent); }

.tpb-title {
    font-size: clamp(1.875rem, 6vw, 3rem);
    line-height: 1.12;
    color: var(--tpb-navy);
    margin: 0.5rem 0 0.75rem;
    overflow-wrap: anywhere;
}
.tpb-lede {
    font-size: 1.15em;
    color: var(--tpb-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.tpb-byline { font-size: 0.875rem; color: var(--tpb-muted); }
.tpb-byline span { color: var(--tpb-ink); font-weight: 600; }
.tpb-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--tpb-accent);
}

.tpb-hero__media { margin-top: 1.5rem; }
.tpb-hero__media img {
    width: 100%;
    border-radius: var(--tpb-radius);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--tpb-wash);
}

.tpb-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tpb-tags li, .tpb-tags a {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    background: var(--tpb-accent-soft);
    color: var(--tpb-accent);
    font-size: 0.75rem;
    font-weight: 600;
}
.tpb-tags li:has(a) { padding: 0; background: none; }

/* ---------- Content flow ---------- */
.tpb-content > * + *, .tpb-col > * + *, .tpb-tabs__panel > * + *, .tpb-overlay__body > * + * { margin-top: 1.25rem; }
.tpb-content h2, .tpb-content h3, .tpb-content h4 { color: var(--tpb-navy); scroll-margin-top: 6rem; }
.tpb-content h2.tpb-block { font-size: 1.6em; margin-top: 2.5rem; }
.tpb-content h3.tpb-block { font-size: 1.3em; margin-top: 2rem; }
.tpb-content h4.tpb-block { font-size: 1.1em; margin-top: 1.5rem; }

.tpb-prose p + p, .tpb-prose p + ul, .tpb-prose ul + p { margin-top: 0.85rem; }
.tpb-prose ul, .tpb-prose-list { padding-left: 1.25rem; }
.tpb-prose ul { list-style: disc; }
ul.tpb-prose-list { list-style: disc; }
ol.tpb-prose-list { list-style: decimal; }
.tpb-prose-list li + li, .tpb-prose li + li { margin-top: 0.35rem; }
.tpb-prose a, .tpb-prose-list a, .tpb-risk-note a, .tpb-alert a {
    color: var(--tpb-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.tpb-muted { color: var(--tpb-muted); }
.tpb-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Block style tokens ---------- */
.tpb-content .tpb-mt-0 { margin-top: 0; }
.tpb-content .tpb-mt-s { margin-top: 0.75rem; }
.tpb-content .tpb-mt-m { margin-top: 1.5rem; }
.tpb-content .tpb-mt-l { margin-top: 2.5rem; }
.tpb-content .tpb-mt-xl { margin-top: 4rem; }
.tpb-mb-0 { margin-bottom: 0; }
.tpb-mb-s { margin-bottom: 0.75rem; }
.tpb-mb-m { margin-bottom: 1.5rem; }
.tpb-mb-l { margin-bottom: 2.5rem; }
.tpb-mb-xl { margin-bottom: 4rem; }
.tpb-p-0 { padding: 0; }
.tpb-p-s { padding: 0.75rem; }
.tpb-p-m { padding: 1.25rem; }
.tpb-p-l { padding: 2rem; }
.tpb-al-left { text-align: left; }
.tpb-al-center { text-align: center; }
.tpb-al-center.tpb-badge-row, .tpb-al-center.tpb-button-group { justify-content: center; }
.tpb-bg-none { background: none; }
.tpb-bg-wash { background: var(--tpb-wash); }
.tpb-bg-primary-100 { background: var(--tpb-p100); }
.tpb-bg-navy { background: var(--tpb-navy); color: #ffffff; }
.tpb-bg-navy h2, .tpb-bg-navy h3, .tpb-bg-navy h4 { color: #ffffff; }
.tpb-tc-ink { color: var(--tpb-ink); }
.tpb-tc-muted { color: var(--tpb-muted); }
.tpb-tc-white { color: #ffffff; }
.tpb-tc-primary { color: var(--tpb-p800); }
.tpb-r-0 { border-radius: 0; }
.tpb-r-s { border-radius: 0.5rem; }
.tpb-r-m { border-radius: 1rem; }
.tpb-r-l { border-radius: 1.75rem; }
.tpb-bw-narrow { max-width: 32rem; margin-left: auto; margin-right: auto; }
.tpb-bw-normal { max-width: 100%; }
.tpb-bw-wide, .tpb-bw-full { max-width: none; }
.tpb-bd-none { border: 0; }
.tpb-bd-line { border: 1px solid var(--tpb-line); }

/* ---------- Buttons ---------- */
.tpb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.tpb-btn--primary { background: var(--tpb-accent); color: #ffffff; }
.tpb-btn--primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.tpb-btn--secondary { border-color: var(--tpb-accent); color: var(--tpb-accent); background: #ffffff; }
.tpb-btn--secondary:hover { background: var(--tpb-accent-soft); }
.tpb-btn--link { padding-left: 0; padding-right: 0; color: var(--tpb-accent); text-decoration: underline; text-underline-offset: 3px; }
.tpb-button-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tpb-btn:focus-visible, .tpb-content a:focus-visible, .tpb-tip:focus-visible, summary:focus-visible {
    outline: 3px solid var(--tpb-p200);
    outline-offset: 2px;
}

/* ---------- Quote, testimonial, author ---------- */
.tpb-quote, .tpb-testimonial {
    position: relative;
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: var(--tpb-radius);
    background: var(--tpb-wash);
}
.tpb-quote blockquote, .tpb-testimonial blockquote {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2em;
    line-height: 1.45;
    color: var(--tpb-navy);
}
.tpb-quote blockquote::before, .tpb-testimonial blockquote::before {
    content: "\201C";
    display: block;
    font-size: 3rem;
    line-height: 0.6;
    color: var(--tpb-accent);
    margin-bottom: 0.25rem;
}
.tpb-quote figcaption, .tpb-testimonial figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--tpb-muted);
}
.tpb-testimonial figcaption { display: flex; align-items: center; gap: 0.75rem; }
.tpb-testimonial figcaption > span:last-child { display: flex; flex-direction: column; }
.tpb-testimonial strong { color: var(--tpb-ink); }
.tpb-avatar img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; }
.tpb-avatar--lg img { width: 4.5rem; height: 4.5rem; }
.tpb-author-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    border: 1px solid var(--tpb-line);
    border-radius: var(--tpb-radius);
}
.tpb-author__name { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1em; color: var(--tpb-navy); }

/* ---------- Media ---------- */
.tpb-image img, .tpb-gallery img { width: 100%; border-radius: 0.75rem; }
.tpb-image figcaption, .tpb-video figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--tpb-muted);
    text-align: center;
}
.tpb-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.tpb-gallery.tpb-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.tpb-gallery img { aspect-ratio: 1; object-fit: cover; }
.tpb-video__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--tpb-navy);
}
.tpb-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Carousel: a scroll-snap strip that works without JS */
.tpb-carousel { position: relative; }
.tpb-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}
.tpb-carousel__slide { scroll-snap-align: start; }
.tpb-carousel__nav { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 0.5rem; }
.tpb-carousel__nav[hidden] { display: none; }
.tpb-carousel__btn {
    width: 2.75rem; height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--tpb-line);
    background: #ffffff;
    color: var(--tpb-navy);
    cursor: pointer;
}
.tpb-carousel__dots { display: flex; gap: 0.4rem; }
.tpb-carousel__dots button {
    width: 0.6rem; height: 0.6rem;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: var(--tpb-p200);
    cursor: pointer;
}
.tpb-carousel__dots button[aria-current="true"] { background: var(--tpb-accent); width: 1.4rem; border-radius: 999px; }

/* ---------- Cards, features, steps ---------- */
.tpb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tpb-line);
    border-radius: var(--tpb-radius);
    background: #ffffff;
    overflow: hidden;
}
.tpb-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tpb-card__body { padding: 1rem 1.1rem 1.2rem; }
.tpb-card__title { font-size: 1.1em; color: var(--tpb-navy); margin-bottom: 0.35rem; }
.tpb-card__body p { font-size: 0.95em; color: var(--tpb-muted); }
.tpb-card--link .tpb-card__title a::after { content: ""; position: absolute; inset: 0; }
.tpb-card--link:hover { box-shadow: var(--shadow-md); }

.tpb-feature-list { display: grid; gap: 1rem; }
.tpb-feature { display: flex; gap: 0.9rem; align-items: flex-start; }
.tpb-feature__icon {
    flex: 0 0 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.75rem;
    background: var(--tpb-accent-soft);
    color: var(--tpb-accent);
}
.tpb-feature__title, .tpb-step__title { font-size: 1.05em; color: var(--tpb-navy); margin-bottom: 0.2rem; }
.tpb-feature p, .tpb-step p { color: var(--tpb-muted); }

.tpb-steps { counter-reset: tpb-step; display: grid; gap: 1rem; }
.tpb-step { counter-increment: tpb-step; display: flex; gap: 0.9rem; }
.tpb-step::before {
    content: counter(tpb-step);
    flex: 0 0 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tpb-accent);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* ---------- Notices ---------- */
.tpb-alert {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: var(--tpb-radius);
    border: 1px solid;
}
.tpb-alert__icon { margin-top: 0.3rem; }
.tpb-alert__title { font-weight: 700; margin-bottom: 0.2rem; }
.tpb-alert--info    { background: var(--tpb-p100); border-color: var(--tpb-p200); color: var(--tpb-p800); }
.tpb-alert--success { background: #e3f6ea; border-color: #b6e3c6; color: #1d6b3d; }
.tpb-alert--warning { background: #fff4d6; border-color: #f3d98b; color: #6b4e00; }
.tpb-alert--tip     { background: #f1ecfe; border-color: #d8cbfb; color: #4b2c99; }

.tpb-banner {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: var(--tpb-navy);
    color: #ffffff;
    overflow: hidden;
}
.tpb-banner__title { font-family: 'Outfit', sans-serif; font-size: 1.5em; font-weight: 700; line-height: 1.2; margin-bottom: 0.4rem; }
.tpb-banner__body p + p { margin-top: 0.9rem; }
.tpb-banner__media img { width: 100%; border-radius: 0.75rem; }
.tpb-banner .tpb-btn--primary { background: #ffffff; color: var(--tpb-navy); }
.tpb-banner .tpb-btn--secondary { background: transparent; color: #ffffff; border-color: #ffffff; }

.tpb-badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tpb-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--tpb-p200);
    background: var(--tpb-p100);
    color: var(--tpb-p800);
    font-size: 0.8125rem;
    font-weight: 600;
}

.tpb-risk-note {
    display: flex;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: var(--tpb-wash);
    font-size: 0.875rem;
    color: var(--tpb-muted);
}
.tpb-risk-note i { margin-top: 0.25rem; }

/* ---------- Layout ---------- */
.tpb-divider { border: 0; height: 1px; background: var(--tpb-line); margin-top: 2rem; margin-bottom: 2rem; }
.tpb-spacer--s { height: 0.75rem; }
.tpb-spacer--m { height: 2rem; }
.tpb-spacer--l { height: 4rem; }

/* ---------- Tables ---------- */
.tpb-table__wrap { overflow-x: auto; border: 1px solid var(--tpb-line); border-radius: 0.75rem; }
.tpb-table table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.tpb-table caption { caption-side: bottom; padding: 0.5rem; font-size: 0.85em; color: var(--tpb-muted); }
.tpb-table th, .tpb-table td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.tpb-table thead th { background: var(--tpb-p100); color: var(--tpb-navy); font-weight: 700; white-space: nowrap; }
.tpb-table tbody tr + tr td { border-top: 1px solid var(--tpb-line); }

/* ---------- Table of contents ---------- */
.tpb-toc { padding: 1rem 1.1rem; border-radius: var(--tpb-radius); background: var(--tpb-wash); }
.tpb-toc__title { font-weight: 700; color: var(--tpb-navy); margin-bottom: 0.4rem; }
.tpb-toc ol { list-style: none; display: grid; gap: 0.3rem; font-size: 0.95em; }
.tpb-toc__l3 { padding-left: 1rem; font-size: 0.95em; }
.tpb-toc a { color: var(--tpb-muted); }
.tpb-toc a:hover, .tpb-toc a.is-active { color: var(--tpb-accent); font-weight: 600; }

/* ---------- Disclosure ---------- */
.tpb-acc { border: 1px solid var(--tpb-line); border-radius: var(--tpb-radius); overflow: hidden; }
.tpb-acc__item + .tpb-acc__item { border-top: 1px solid var(--tpb-line); }
.tpb-acc summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    font-weight: 600;
    color: var(--tpb-navy);
    cursor: pointer;
    list-style: none;
}
.tpb-acc summary::-webkit-details-marker { display: none; }
.tpb-acc summary i { transition: transform 0.2s; color: var(--tpb-accent); }
.tpb-acc details[open] summary i { transform: rotate(180deg); }
.tpb-acc__body { padding: 0 1.1rem 1.1rem; color: var(--tpb-muted); }

.tpb-tabs__list {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--tpb-wash);
}
.tpb-tabs__list[hidden] { display: none; }
.tpb-tabs__list button {
    flex: 1 0 auto;
    min-height: 2.5rem;
    padding: 0.45rem 1rem;
    border: 0;
    border-radius: 999px;
    background: none;
    font: 600 0.9rem 'Outfit', sans-serif;
    color: var(--tpb-muted);
    cursor: pointer;
}
.tpb-tabs__list button[aria-selected="true"] { background: #ffffff; color: var(--tpb-accent); box-shadow: var(--shadow-sm); }
.tpb-tabs__panel { padding-top: 1rem; }
.tpb-tabs__label { font-weight: 700; color: var(--tpb-navy); }
.tpb-tabs.is-ready .tpb-tabs__label { display: none; }
.tpb-tabs.is-ready .tpb-tabs__panel[hidden] { display: none; }

/* ---------- Overlays: :target opens them without JS ---------- */
.tpb-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    margin: 0 !important;
}
.tpb-overlay:target, .tpb-overlay.is-open { display: flex; }
.tpb-overlay__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.tpb-overlay__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--tpb-ink);
    max-height: 100%;
    overflow: hidden;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35);
}
.tpb-overlay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.5rem;
}
.tpb-overlay__title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--tpb-navy); }
.tpb-overlay__close {
    flex: 0 0 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tpb-wash);
    color: var(--tpb-navy);
}
.tpb-overlay__body { padding: 0.5rem 1.1rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; }

.tpb-overlay--modal { align-items: center; justify-content: center; padding: 1rem; }
.tpb-overlay--modal .tpb-overlay__panel { width: 100%; max-width: 32rem; border-radius: 1.25rem; max-height: 90vh; }

.tpb-overlay--sheet .tpb-overlay__panel { width: min(24rem, 88vw); height: 100%; }
.tpb-overlay--right { justify-content: flex-end; }
.tpb-overlay--left { justify-content: flex-start; }

.tpb-overlay--drawer { align-items: flex-end; }
.tpb-overlay--drawer .tpb-overlay__panel {
    width: 100%;
    max-height: 85vh;
    border-radius: 1.25rem 1.25rem 0 0;
    touch-action: none;
}
.tpb-overlay--drawer .tpb-overlay__body { touch-action: pan-y; }
.tpb-drawer__handle { display: flex; justify-content: center; padding: 0.75rem 0 0.25rem; cursor: grab; }
.tpb-drawer__handle span { width: 2.75rem; height: 0.3rem; border-radius: 999px; background: var(--tpb-line); }

.tpb-overlay.is-open .tpb-overlay__backdrop { animation: tpb-fade 0.2s ease-out; }
.tpb-overlay--modal.is-open .tpb-overlay__panel { animation: tpb-pop 0.25s var(--ease-out-expo, ease-out); }
.tpb-overlay--right.is-open .tpb-overlay__panel { animation: tpb-in-right 0.3s var(--ease-out-expo, ease-out); }
.tpb-overlay--left.is-open .tpb-overlay__panel { animation: tpb-in-left 0.3s var(--ease-out-expo, ease-out); }
.tpb-overlay--drawer.is-open .tpb-overlay__panel { animation: tpb-in-up 0.35s var(--ease-out-expo, ease-out); }
@keyframes tpb-fade { from { opacity: 0; } }
@keyframes tpb-pop { from { opacity: 0; transform: scale(0.96); } }
@keyframes tpb-in-right { from { transform: translateX(100%); } }
@keyframes tpb-in-left { from { transform: translateX(-100%); } }
@keyframes tpb-in-up { from { transform: translateY(100%); } }
html.tpb-lock, html.tpb-lock body { overflow: hidden; }

/* ---------- Interactive ---------- */
.tpb-radio-group {
    border: 1px solid var(--tpb-line);
    border-radius: var(--tpb-radius);
    padding: 1rem 1.1rem 1.1rem;
}
.tpb-radio-group legend { padding: 0 0.35rem; font-weight: 700; color: var(--tpb-navy); }
.tpb-rg__opt { margin-top: 0.5rem; }
.tpb-rg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.tpb-rg__opt label {
    display: block;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--tpb-line);
    border-radius: 0.75rem;
    cursor: pointer;
}
.tpb-rg__opt label:hover { border-color: var(--tpb-p200); background: var(--tpb-wash); }
.tpb-rg__opt input:focus-visible + label { outline: 3px solid var(--tpb-p200); outline-offset: 2px; }
.tpb-rg__opt input:checked + label { border-color: var(--tpb-accent); background: var(--tpb-accent-soft); font-weight: 600; }
.tpb-rg__fb { display: none; padding: 0.4rem 0.9rem 0; font-size: 0.9em; color: var(--tpb-muted); }
.tpb-rg__opt input:checked ~ .tpb-rg__fb { display: block; }
.tpb-rg--quiz .tpb-rg__opt--correct input:checked + label { border-color: #23854b; background: #e3f6ea; }
.tpb-rg--quiz .tpb-rg__opt:not(.tpb-rg__opt--correct) input:checked + label { border-color: #b42318; background: #fde8e6; }
.tpb-rg--quiz.is-answered .tpb-rg__opt--correct label { border-color: #23854b; }
.tpb-rg__note { margin-top: 0.6rem; font-size: 0.8125rem; color: var(--tpb-muted); }

.tpb-checklist { display: grid; gap: 0.5rem; }
.tpb-checklist label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--tpb-line);
    border-radius: 0.75rem;
    cursor: pointer;
}
.tpb-checklist input { width: 1.15rem; height: 1.15rem; margin-top: 0.3rem; accent-color: var(--tpb-accent); flex: none; }
.tpb-checklist input:checked + span { color: var(--tpb-muted); text-decoration: line-through; }

.tpb-countdown {
    padding: 1.1rem;
    border-radius: var(--tpb-radius);
    background: var(--tpb-navy);
    color: #ffffff;
    text-align: center;
}
.tpb-countdown__label { font-size: 0.875rem; opacity: 0.85; margin-bottom: 0.4rem; }
.tpb-countdown__value { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.2rem; }
.tpb-countdown__units { display: flex; justify-content: center; gap: 0.5rem; }
.tpb-countdown__unit {
    min-width: 3.6rem;
    padding: 0.4rem 0.3rem;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
}
.tpb-countdown__unit b { display: block; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tpb-countdown__unit small { font-size: 0.7rem; font-weight: 500; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; }

.tpb-tip {
    position: relative;
    text-decoration: underline dotted var(--tpb-accent);
    text-underline-offset: 3px;
    cursor: help;
}
.tpb-tip__bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translateX(-50%);
    width: max-content;
    max-width: min(16rem, 80vw);
    padding: 0.5rem 0.7rem;
    border-radius: 0.5rem;
    background: var(--tpb-navy);
    color: #ffffff;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-decoration: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}
.tpb-tip:hover .tpb-tip__bubble, .tpb-tip:focus .tpb-tip__bubble { visibility: visible; opacity: 1; }

/* ---------- Sticky CTA ---------- */
.tpb-sticky {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.65rem 0.65rem 1rem;
    border-radius: 999px;
    background: var(--tpb-navy);
    color: #ffffff;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.45);
}
.tpb-sticky__text { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.tpb-sticky .tpb-btn { flex: none; background: #ffffff; color: var(--tpb-navy); }

/* ---------- List page ---------- */
.tpb-list-head { margin-bottom: 2rem; }
.tpb-post-grid { display: grid; gap: 1.25rem; }
.tpb-post-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tpb-line);
    border-radius: var(--tpb-radius);
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.2s, transform 0.2s;
}
.tpb-post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tpb-post-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tpb-wash); }
.tpb-post-card__body { padding: 1rem 1.1rem 1.25rem; display: grid; gap: 0.5rem; }
.tpb-post-card__date { font-size: 0.8125rem; color: var(--tpb-muted); }
.tpb-post-card__title { font-size: 1.25rem; color: var(--tpb-navy); }
.tpb-post-card__title a::after { content: ""; position: absolute; inset: 0; }
.tpb-post-card__summary { color: var(--tpb-muted); font-size: 0.95em; }
.tpb-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.tpb-empty, .tpb-error { padding: 2rem 0; color: var(--tpb-muted); }
.tpb-error .tpb-btn { margin-top: 1rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 40rem) {
    .tpb-main { padding: 8rem 1.5rem 5rem; }
    .tpb-grid--2, .tpb-grid--3, .tpb-grid--4, .tpb-post-grid { grid-template-columns: repeat(2, 1fr); }
    .tpb-gallery.tpb-grid--3, .tpb-gallery.tpb-grid--4 { grid-template-columns: repeat(3, 1fr); }
    .tpb-feature-list { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .tpb-carousel__track { grid-auto-columns: 60%; }
    .tpb-banner--image { grid-template-columns: 1fr 1fr; align-items: center; }
    .tpb-banner { padding: 2rem; }
    .tpb-sticky { left: 50%; right: auto; transform: translateX(-50%); width: min(40rem, calc(100% - 2rem)); }
    .tpb-overlay--drawer .tpb-overlay__panel { max-width: 40rem; margin: 0 auto; }
    .tpb-quote, .tpb-testimonial { padding: 2rem; }
}
@media (min-width: 64rem) {
    .tpb-grid--3, .tpb-post-grid { grid-template-columns: repeat(3, 1fr); }
    .tpb-grid--4 { grid-template-columns: repeat(4, 1fr); }
    .tpb-gallery.tpb-grid--4 { grid-template-columns: repeat(4, 1fr); }
    .tpb-pw-normal .tpb-post-grid, .tpb-pw-narrow .tpb-post-grid { grid-template-columns: repeat(2, 1fr); }
    .tpb-carousel__track { grid-auto-columns: calc((100% - 0.75rem) / 2); }
    .tpb-hero--image_side { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; }
    .tpb-hero--image_side .tpb-hero__media { margin-top: 0; }
    .tpb-hero--image_side .tpb-hero__media img { aspect-ratio: 4 / 3; }
    .tpb-bw-wide { margin-left: -6rem; margin-right: -6rem; }
    .tpb-bw-full { margin-left: calc(50% - 50vw + 1rem); margin-right: calc(50% - 50vw + 1rem); }
}
@media (min-width: 64rem) {
    .tpb-pw-wide .tpb-bw-wide { margin-left: 0; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .tpb-overlay *, .tpb-carousel__track, .tpb-post-card, .tpb-btn { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
