/*
 * Single blog post — single.php.
 *
 * Dark title band (the header's black, so the two read as one surface), the
 * cover photo overlapping its lower edge, a reading column beside a sticky
 * rail, then related posts on the global #F7F7F7 ground.
 *
 * Long Georgian text needs more room than the shop's 15px / 24px body, so the
 * reading column runs FiraGO at 18px / 1.8 on a ~768px measure. Headings use
 * Gilroy Geo, uppercase like the rest of the site (Georgian renders as
 * Mtavruli).
 *
 * Content rules target the markup Gutenberg core blocks save (paragraph,
 * heading, list, image, quote, table, embed, group), the Elementor-era posts'
 * plain HTML, and the block styles registered in inc/blog-single.php:
 * is-style-tr-callout, is-style-tr-takeaway, is-style-tr-cards.
 */

.tr-post,
.tr-post-related {
    --tp-wrap:   1180px;
    --tp-pad:    24px;
    --tp-rail:   300px;
    --tp-gap:    64px;
    --tp-ink:    #111111;
    --tp-text:   #353535;
    --tp-muted:  #8a8a8a;
    --tp-line:   rgba(0, 0, 0, 0.08);
    --tp-card:   #ffffff;
    --tp-red:    var(--tr-brand, #BF3434);
    --tp-red-dk: #9f2a2a;
    --tp-radius: 16px;
    --tp-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.32), 0 2px 10px rgba(0, 0, 0, 0.04);
    --tp-sticky: calc(var(--trc-hdr-1, 78px) + 24px);
    --tp-head:   var(--tr-font-ka-head, "Gilroy Geo"), sans-serif;
    --tp-body:   FiraGO, "Open Sans", Arial, sans-serif;
    --tp-num:    Bebas, "Bebas Neue", var(--tr-font-ka-head, "Gilroy Geo"), sans-serif;
}

/* ── Reading progress ─────────────────────────────────────────── */

.tr-post-progress {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0px);
    left: 0;
    right: 0;
    z-index: 10002;
    height: 3px;
    pointer-events: none;
}
.tr-post-progress__bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--tr-brand, #BF3434), #ff6b5e);
    transform: scaleX(0);
    transform-origin: 0 50%;
    will-change: transform;
}

/* ── Hero ─────────────────────────────────────────────────────── */

.tr-post__hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 34px var(--tp-pad) 64px;
    border-radius: 0 0 28px 28px;
    background: #0c0c0c;
    color: #fff;
}
.tr-post--cover .tr-post__hero { padding-bottom: 172px; }

/* Red glow top-right, and faint "speed lines" fading in from the left. */
.tr-post__hero::before {
    content: "";
    position: absolute;
    top: -55%;
    right: -12%;
    z-index: -1;
    width: 72%;
    height: 190%;
    background: radial-gradient(closest-side, rgba(191, 52, 52, 0.42), rgba(191, 52, 52, 0) 72%);
    pointer-events: none;
}
.tr-post__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 26px);
    -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 95%);
            mask-image: linear-gradient(90deg, transparent 25%, #000 95%);
    pointer-events: none;
}

.tr-post__hero-inner {
    max-width: calc(var(--tp-wrap) - 2 * var(--tp-pad));
    margin: 0 auto;
}

.tr-post__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-family: var(--tp-body);
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.4);
}
.tr-post__crumbs a {
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.15s ease;
}
.tr-post__crumbs a:hover { color: #fff; }

.tr-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 18px;
    font-family: var(--tp-body);
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
}
.tr-post__cat {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--tp-red);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}
.tr-post__cat:hover { background: var(--tp-red-dk); color: #fff; }
.tr-post__meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}
.tr-post__read { display: inline-flex; align-items: center; gap: 7px; }
.tr-post__read svg { opacity: 0.8; }

.tr-post__title {
    max-width: 1000px;
    margin: 0;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: clamp(28px, 3.7vw, 50px);
    line-height: 1.14;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    color: #fff;
    text-wrap: balance;
    overflow-wrap: break-word;
}

.tr-post__lead {
    max-width: 760px;
    margin: 22px 0 0;
    font-family: var(--tp-body);
    font-size: 18px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.76);
}

.tr-post__byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    font-family: var(--tp-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
}
.tr-post__author { text-transform: capitalize; }
.tr-post__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.16);
}

/* ── Cover ────────────────────────────────────────────────────── */

.tr-post__cover {
    position: relative;
    z-index: 1;
    max-width: var(--tp-wrap);
    margin: -128px auto 0;
    padding: 0 var(--tp-pad);
}
.tr-post__cover-img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: var(--tp-radius);
    background: #1b1b1b;
    box-shadow: 0 40px 70px -42px rgba(0, 0, 0, 0.6);
}
.tr-post__cover-caption {
    margin-top: 10px;
    font-family: var(--tp-body);
    font-size: 13px;
    color: var(--tp-muted);
}

/* ── Layout: reading column + rail ────────────────────────────── */

.tr-post__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--tp-rail);
    gap: var(--tp-gap);
    align-items: start;
    max-width: var(--tp-wrap);
    margin: 56px auto 0;
    padding: 0 var(--tp-pad);
}
.tr-post__body { min-width: 0; }
.tr-post__aside {
    position: sticky;
    top: var(--tp-sticky);
}
.tr-post__rail {
    display: grid;
    gap: 18px;
}

/* ── Contents ─────────────────────────────────────────────────── */

.tr-toc__title {
    margin: 0 0 8px;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tp-ink);
}
.tr-toc__list { counter-reset: tr-toc; }
.tr-toc__item { counter-increment: tr-toc; }
.tr-toc__item a {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--tp-line);
    font-family: var(--tp-body);
    font-size: 14px;
    line-height: 1.45;
    color: #4d4d4d;
    transition: color 0.15s ease;
}
.tr-toc__item:first-child a { border-top: 0; }
.tr-toc__item a::before {
    content: counter(tr-toc, decimal-leading-zero);
    flex: 0 0 22px;
    font-family: var(--tp-num);
    font-size: 17px;
    line-height: 1.2;
    color: #c2c2c2;
    transition: color 0.15s ease;
}
.tr-toc__item a:hover,
.tr-toc__item a.is-active { color: var(--tp-ink); }
.tr-toc__item a:hover::before,
.tr-toc__item a.is-active::before { color: var(--tp-red); }

.tr-toc--rail {
    padding: 22px 22px 12px;
    border-radius: var(--tp-radius);
    background: var(--tp-card);
    box-shadow: var(--tp-shadow);
}

/* Collapsible copy above the text, for screens without the rail. */
.tr-toc--inline {
    display: none;
    margin-bottom: 30px;
    border-radius: 14px;
    background: var(--tp-card);
    box-shadow: var(--tp-shadow);
}
.tr-toc--inline > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 17px 20px;
    cursor: pointer;
    list-style: none;
}
.tr-toc--inline > summary::-webkit-details-marker { display: none; }
.tr-toc--inline > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin: -4px 4px 0 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin 0.2s ease;
}
.tr-toc--inline[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.tr-toc--inline .tr-toc__list { padding: 0 20px 10px; }

/* ── Shop card ────────────────────────────────────────────────── */

.tr-post-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 26px 24px 24px;
    border-radius: var(--tp-radius);
    background: #0f0f0f;
    color: #fff;
}
.tr-post-cta::before {
    content: "";
    position: absolute;
    top: -60%;
    right: -40%;
    z-index: -1;
    width: 130%;
    height: 160%;
    background: radial-gradient(closest-side, rgba(191, 52, 52, 0.5), rgba(191, 52, 52, 0) 70%);
}
.tr-post-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 22px);
    -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 60%);
            mask-image: linear-gradient(200deg, #000 10%, transparent 60%);
}
.tr-post-cta__eyebrow {
    display: block;
    font-family: var(--tp-num);
    font-size: 15px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
}
.tr-post-cta__title {
    margin: 6px 0 8px;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: 21px;
    line-height: 1.25;
    text-transform: uppercase;
    color: #fff;
}
.tr-post-cta__text {
    margin: 0;
    font-family: var(--tp-body);
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.68);
}
.tr-post-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 18px 12px 20px;
    border-radius: 999px;
    background: var(--tp-red);
    color: #fff;
    font-family: var(--tp-body);
    font-size: 14px;
    transition: background-color 0.2s ease, gap 0.2s ease;
}
.tr-post-cta__btn:hover { gap: 14px; background: var(--tp-red-dk); color: #fff; }

/* ── Article body ─────────────────────────────────────────────── */

.tr-post__content {
    font-family: var(--tp-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--tp-text);
    overflow-wrap: break-word;
}
.tr-post__content::after { content: ""; display: table; clear: both; }

.tr-post__content > * { margin: 0; }
.tr-post__content > * + * { margin-top: 1.3em; }
.tr-post__content > :first-child { margin-top: 0; }

.tr-post__content > p:first-of-type {
    font-size: 1.11em;
    line-height: 1.75;
    color: #222;
}

.tr-post__content a {
    color: var(--tp-red);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color 0.15s ease;
}
.tr-post__content a:hover { color: var(--tp-red-dk); }
.tr-post__content strong,
.tr-post__content b { font-weight: 700; color: var(--tp-ink); }

/* Headings */
.tr-post__content h2,
.tr-post__content h3,
.tr-post__content h4 {
    clear: both;
    font-family: var(--tp-head);
    font-weight: 800;
    color: var(--tp-ink);
    scroll-margin-top: var(--tp-sticky);
}
.tr-post__content h2 {
    position: relative;
    margin-top: 2.3em;
    padding-top: 20px;
    font-size: 28px;
    line-height: 1.28;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.tr-post__content h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--tp-red);
}
.tr-post__content > h2:first-child { margin-top: 0; }
.tr-post__content h3 {
    margin-top: 1.9em;
    font-size: 21px;
    line-height: 1.35;
}
.tr-post__content h4 {
    margin-top: 1.7em;
    font-size: 18px;
    line-height: 1.4;
}
.tr-post__content h2 + *,
.tr-post__content h3 + *,
.tr-post__content h4 + * { margin-top: 0.85em; }

/* Lists */
.tr-post__content ul,
.tr-post__content ol { padding: 0; list-style: none; }
.tr-post__content li {
    position: relative;
    padding-left: 30px;
}
.tr-post__content li + li { margin-top: 0.55em; }
.tr-post__content li > p { margin: 0; }
.tr-post__content li ul,
.tr-post__content li ol { margin-top: 0.55em; }
.tr-post__content ul > li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--tp-red);
    transform: rotate(45deg);
}
.tr-post__content ol { counter-reset: tr-ol; }
.tr-post__content ol > li {
    padding-left: 40px;
    counter-increment: tr-ol;
}
.tr-post__content ol > li::before {
    content: counter(tr-ol);
    position: absolute;
    top: 0.2em;
    left: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tp-ink);
    color: #fff;
    font: 700 13px/26px var(--tp-body);
    text-align: center;
}

/* List style "ბარათები" — numbered cards. */
.tr-post__content .is-style-tr-cards {
    display: grid;
    gap: 12px;
    counter-reset: tr-cards;
}
.tr-post__content .is-style-tr-cards > li {
    margin: 0;
    padding: 18px 22px 18px 64px;
    border-radius: 14px;
    background: var(--tp-card);
    box-shadow: var(--tp-shadow);
    font-size: 16px;
    line-height: 1.7;
    counter-increment: tr-cards;
}
.tr-post__content .is-style-tr-cards > li::before {
    content: counter(tr-cards, decimal-leading-zero);
    top: 17px;
    left: 22px;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    transform: none;
    font-family: var(--tp-num);
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    color: var(--tp-red);
}
.tr-post__content .is-style-tr-cards > li > strong:first-child {
    display: block;
    margin-bottom: 4px;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: 16px;
    line-height: 1.4;
    color: var(--tp-ink);
}

/* Images. img.emoji is WordPress's emoji fallback — left alone. */
.tr-post__content figure { margin-block: 2em; }
.tr-post__content img:not(.emoji) {
    height: auto;
    border-radius: 14px;
    cursor: zoom-in;
}
.tr-post__content a img:not(.emoji) { cursor: pointer; }
.tr-post__content figure > img,
.tr-post__content .wp-block-image:not(.size-thumbnail):not(.size-medium) img { width: 100%; }

/* Core wraps left/right-aligned image blocks in div.wp-block-image; the
   wrapper itself must not add space, the floated figure carries it. */
.tr-post__content > .wp-block-image:has(> .alignright, > .alignleft) { margin: 0; }
.tr-post__content figcaption,
.tr-post__content .wp-element-caption {
    display: flex;
    gap: 12px;
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--tp-muted);
    text-align: left;
}
.tr-post__content figcaption::before {
    content: "";
    flex: 0 0 18px;
    height: 2px;
    margin-top: 0.72em;
    background: var(--tp-red);
}

.tr-post__content .alignright,
.tr-post__content .wp-block-image.alignright {
    float: right;
    display: block;
    width: min(46%, 360px);
    margin: 1.3em 0 1em 32px;
}
.tr-post__content .alignleft,
.tr-post__content .wp-block-image.alignleft {
    float: left;
    display: block;
    width: min(46%, 360px);
    margin: 1.3em 32px 1em 0;
}
.tr-post__content .aligncenter { margin-inline: auto; text-align: center; }
.tr-post__content .wp-block-image.alignright > figcaption,
.tr-post__content .wp-block-image.alignleft > figcaption { display: flex; }

/* Elementor-era posts: their trailing photo list, as a grid. */
.tr-post__content .tr-post__gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-block: 2em;
}
.tr-post__content .tr-post__gallery figure { margin: 0; }
.tr-post__content .tr-post__gallery img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}

/* Group style "ინფო ბლოკი" */
.tr-post__content .is-style-tr-callout {
    clear: both;
    position: relative;
    overflow: hidden;
    margin-block: 2.2em;
    padding: 26px 28px 26px 33px;
    border-radius: var(--tp-radius);
    background: var(--tp-card);
    box-shadow: var(--tp-shadow);
    font-size: 16.5px;
    line-height: 1.75;
}
.tr-post__content .is-style-tr-callout::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background: var(--tp-red);
}
/* Classic themes get group content wrapped in .wp-block-group__inner-container,
   so the spacing rules below cover both shapes of the markup. */
.tr-post__content :is(.is-style-tr-callout, .is-style-tr-callout > .wp-block-group__inner-container) > * { margin: 0; }
.tr-post__content :is(.is-style-tr-callout, .is-style-tr-callout > .wp-block-group__inner-container) > * + * { margin-top: 0.7em; }
.tr-post__content .is-style-tr-callout h2,
.tr-post__content .is-style-tr-callout h3,
.tr-post__content .is-style-tr-callout h4 {
    margin: 0;
    padding: 0;
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    color: var(--tp-red);
}
.tr-post__content .is-style-tr-callout h2::before { display: none; }
.tr-post__content :is(.is-style-tr-callout, .is-style-tr-callout > .wp-block-group__inner-container) > :is(h2, h3, h4) + * { margin-top: 0.5em; }

/* Group style "მუქი ბლოკი" */
.tr-post__content .is-style-tr-takeaway {
    clear: both;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-block: 2.4em;
    padding: 34px 38px 34px 42px;
    border-radius: 20px;
    background: #111;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.65;
}
.tr-post__content .is-style-tr-takeaway::before {
    content: "";
    position: absolute;
    top: -70%;
    right: -25%;
    z-index: -1;
    width: 80%;
    height: 220%;
    background: radial-gradient(closest-side, rgba(191, 52, 52, 0.38), rgba(191, 52, 52, 0) 72%);
}
.tr-post__content .is-style-tr-takeaway::after {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 34px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--tp-red);
}
.tr-post__content :is(.is-style-tr-takeaway, .is-style-tr-takeaway > .wp-block-group__inner-container) > * { margin: 0; }
.tr-post__content :is(.is-style-tr-takeaway, .is-style-tr-takeaway > .wp-block-group__inner-container) > * + * { margin-top: 0.8em; }
.tr-post__content .is-style-tr-takeaway :is(h2, h3, h4, strong, b, a) { color: #fff; }
.tr-post__content .is-style-tr-takeaway h2 { padding-top: 0; font-size: 22px; }
.tr-post__content .is-style-tr-takeaway h2::before { display: none; }

/* Quote */
.tr-post__content blockquote {
    clear: both;
    margin-block: 2em;
    padding: 4px 0 4px 26px;
    border-left: 4px solid var(--tp-red);
    font-size: 21px;
    line-height: 1.6;
    color: var(--tp-ink);
}
.tr-post__content blockquote > * { margin: 0; }
.tr-post__content blockquote > * + * { margin-top: 0.8em; }
.tr-post__content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    font-style: normal;
    color: var(--tp-muted);
}

/* Table */
.tr-post__content .wp-block-table { overflow-x: auto; }
.tr-post__content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 12px;
    background: var(--tp-card);
    font-size: 15.5px;
    line-height: 1.6;
}
.tr-post__content th,
.tr-post__content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--tp-line);
    text-align: left;
    vertical-align: top;
}
.tr-post__content th {
    background: #fafafa;
    font-family: var(--tp-head);
    font-weight: 800;
    color: var(--tp-ink);
}

/* Video (core Video block). Black 16:9 frame; until the first play,
   blog-single.js swaps the native controls for one big button + duration. */
.tr-post__content .wp-block-video { position: relative; }
.tr-post__content .wp-block-video video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #000;
}
.tr-post__content :is(.is-style-tr-callout, .is-style-tr-callout > .wp-block-group__inner-container) > .wp-block-video { margin-top: 1.1em; }

.tr-video__frame {
    position: relative;
    border-radius: 12px;
    background: #000;
    cursor: pointer;
}
.tr-video__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 55%),
        linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 40%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.tr-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--tp-red);
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.tr-video__play::before {
    content: "";
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    animation: tr-video-pulse 2.2s ease-out infinite;
}
.tr-video__play svg { margin-left: 4px; }
.tr-video__frame:hover .tr-video__play,
.tr-video__play:focus-visible {
    background: var(--tp-red-dk);
    transform: translate(-50%, -50%) scale(1.06);
}
.tr-video__time {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font: 600 12px/1.2 var(--tp-body);
    letter-spacing: 0.03em;
    pointer-events: none;
}
.tr-video__time:empty { display: none; }
.tr-video.is-started .tr-video__frame { cursor: auto; }
.tr-video.is-started .tr-video__frame::after { opacity: 0; }
.tr-video.is-started .tr-video__play,
.tr-video.is-started .tr-video__time { display: none; }

@keyframes tr-video-pulse {
    0%   { opacity: 0.9; transform: scale(0.85); }
    100% { opacity: 0;   transform: scale(1.35); }
}

/* Embeds (YouTube etc.) — sizing comes from core's embed block CSS. */
.tr-post__content .wp-block-embed { margin-block: 2em; }
.tr-post__content .wp-block-embed__wrapper {
    overflow: hidden;
    border-radius: 14px;
    background: #000;
}
.tr-post__content iframe { max-width: 100%; border: 0; }

.tr-post__content hr {
    height: 1px;
    margin-block: 2.6em;
    border: 0;
    background: var(--tp-line);
}

/* ── Article footer: tags + share ─────────────────────────────── */

.tr-post__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--tp-line);
}
.tr-post__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-post__tags a {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--tp-line);
    border-radius: 999px;
    background: var(--tp-card);
    font-family: var(--tp-body);
    font-size: 13px;
    color: var(--tp-text);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.tr-post__tags a:hover { border-color: var(--tp-red); color: var(--tp-red); }

.tr-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.tr-share__label {
    margin-right: 4px;
    font-family: var(--tp-body);
    font-size: 14px;
    color: var(--tp-muted);
}
.tr-share__btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--tp-line);
    border-radius: 50%;
    background: var(--tp-card);
    color: var(--tp-ink);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tr-share__btn:hover,
.tr-share__btn:focus-visible {
    border-color: var(--tp-red);
    background: var(--tp-red);
    color: #fff;
    transform: translateY(-2px);
}
.tr-share__btn[hidden] { display: none; }
.tr-share__btn .tr-ic-check { display: none; }
.tr-share__btn.is-copied { border-color: #1e9b57; background: #1e9b57; color: #fff; }
.tr-share__btn.is-copied .tr-ic-link { display: none; }
.tr-share__btn.is-copied .tr-ic-check { display: block; }
.tr-share__btn.is-copied::after {
    content: attr(data-copied);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--tp-ink);
    color: #fff;
    font-family: var(--tp-body);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
}

/* ── Comments ─────────────────────────────────────────────────── */

.tr-post__comments {
    margin-top: 56px;
    font-family: var(--tp-body);
}
.tr-post__comments #comments,
.tr-post__comments .comment-reply-title {
    margin: 0 0 8px;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: 20px;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--tp-ink);
}
.tr-post__comments .comment-reply-title small { display: block; font-size: 13px; text-transform: none; }
.tr-post__comments .comment-reply-title small a { color: var(--tp-red); }
.tr-post__comments .commentlist {
    display: grid;
    gap: 14px;
    margin: 18px 0 36px;
}
.tr-post__comments .commentlist .children {
    display: grid;
    gap: 14px;
    margin: 14px 0 0 24px;
}
.tr-post__comments .comment-body {
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--tp-card);
    box-shadow: var(--tp-shadow);
    font-size: 15px;
    line-height: 1.7;
    color: var(--tp-text);
}
.tr-post__comments .comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tp-ink);
}
.tr-post__comments .comment-author img { border-radius: 50%; }
.tr-post__comments .comment-author cite { font-style: normal; font-weight: 700; }
.tr-post__comments .says { display: none; }
.tr-post__comments .commentmetadata { margin: 4px 0 8px; font-size: 12px; color: var(--tp-muted); }
.tr-post__comments .reply a { font-size: 13px; color: var(--tp-red); }

.tr-post__comments .comment-respond {
    padding: 28px;
    border-radius: var(--tp-radius);
    background: var(--tp-card);
    box-shadow: var(--tp-shadow);
}
.tr-post__comments .comment-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 14px;
}
.tr-post__comments .comment-form > * {
    grid-column: 1 / -1;
    margin: 0 0 14px;
}
.tr-post__comments .comment-form > .comment-form-author,
.tr-post__comments .comment-form > .comment-form-email,
.tr-post__comments .comment-form > .comment-form-url { grid-column: auto; }
.tr-post__comments .comment-notes,
.tr-post__comments .logged-in-as {
    font-size: 13px;
    color: var(--tp-muted);
}
.tr-post__comments .comment-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--tp-ink);
}
.tr-post__comments .comment-form .required { color: var(--tp-red); }
.tr-post__comments .comment-form input[type="text"],
.tr-post__comments .comment-form input[type="email"],
.tr-post__comments .comment-form input[type="url"],
.tr-post__comments .comment-form textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fafafa;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tp-ink);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tr-post__comments .comment-form textarea { min-height: 140px; resize: vertical; }
.tr-post__comments .comment-form input:focus,
.tr-post__comments .comment-form textarea:focus {
    border-color: var(--tp-red);
    background: #fff;
    outline: none;
}
.tr-post__comments .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.tr-post__comments .comment-form-cookies-consent input { margin-top: 4px; accent-color: var(--tp-red); }
.tr-post__comments .comment-form-cookies-consent label {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tp-muted);
}
.tr-post__comments .form-submit { margin-bottom: 0; }
.tr-post__comments .form-submit input[type="submit"] {
    padding: 13px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--tp-red);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.tr-post__comments .form-submit input[type="submit"]:hover { background: var(--tp-red-dk); }

/* ── Related posts ────────────────────────────────────────────── */

.tr-post-related {
    max-width: var(--tp-wrap);
    margin: 88px auto 0;
    padding: 0 var(--tp-pad) 88px;
}
.tr-post-related__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.tr-post-related__title {
    margin: 0;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: 30px;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--tp-ink);
}
.tr-post-related__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tp-body);
    font-size: 14px;
    color: var(--tp-red);
    white-space: nowrap;
    transition: gap 0.2s ease;
}
.tr-post-related__all:hover { gap: 12px; color: var(--tp-red-dk); }
.tr-post-related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.tr-rcard {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--tp-radius);
    background: var(--tp-card);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tr-rcard:hover { transform: translateY(-4px); box-shadow: var(--tp-shadow); }
.tr-rcard__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111;
}
.tr-rcard__media > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tr-rcard:hover .tr-rcard__media > img { transform: scale(1.05); }
.tr-rcard__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(120% 120% at 100% 0%, rgba(191, 52, 52, 0.4), rgba(191, 52, 52, 0) 60%), #111;
}
.tr-rcard__ph img { width: 46%; height: auto; opacity: 0.55; }
.tr-rcard__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 22px;
}
.tr-rcard__date {
    font-family: var(--tp-body);
    font-size: 13px;
    color: var(--tp-muted);
}
.tr-rcard__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-family: var(--tp-head);
    font-weight: 800;
    font-size: 17px;
    line-height: 1.32;
    text-transform: uppercase;
}
.tr-rcard__title a { color: var(--tp-ink); transition: color 0.15s ease; }
.tr-rcard__title a::after { content: ""; position: absolute; inset: 0; }
.tr-rcard:hover .tr-rcard__title a { color: var(--tp-red); }

/* ── Photo zoom (built by blog-single.js) ─────────────────────── */

.tr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    background: rgba(8, 8, 8, 0.94);
    opacity: 0;
    cursor: zoom-out;
    transition: opacity 0.2s ease;
}
.tr-lightbox.is-open { opacity: 1; }
.tr-lightbox img {
    width: auto;
    height: auto;
    max-width: min(100%, 1600px);
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.tr-lightbox__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 26px;
    line-height: 44px;
    text-align: center;
    transition: background-color 0.2s ease;
}
.tr-lightbox__close:hover { background: var(--tr-brand, #BF3434); }
html.tr-lightbox-open { overflow: hidden; }

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1080px) {
    .tr-post__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
        max-width: 860px;
    }
    .tr-post__aside { position: static; }
    .tr-toc--rail { display: none; }
    .tr-toc--inline { display: block; }
}

@media (max-width: 900px) {
    .tr-post-related__grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(250px, 76%);
        gap: 16px;
        overflow-x: auto;
        margin-inline: calc(-1 * var(--tp-pad));
        padding: 4px var(--tp-pad) 18px;
        scroll-padding-inline: var(--tp-pad);
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .tr-post-related__grid::-webkit-scrollbar { display: none; }
    .tr-rcard { scroll-snap-align: start; }
    .tr-rcard:hover { transform: none; }
}

@media (max-width: 640px) {
    .tr-post,
    .tr-post-related { --tp-pad: 16px; }

    .tr-post__hero { padding-top: 22px; padding-bottom: 44px; border-radius: 0 0 20px 20px; }
    .tr-post--cover .tr-post__hero { padding-bottom: 100px; }
    .tr-post__crumbs { margin-bottom: 18px; }
    .tr-post__meta { margin-bottom: 14px; font-size: 13px; }
    .tr-post__title { font-size: 25px; line-height: 1.2; }
    .tr-post__lead { margin-top: 16px; font-size: 16px; }
    .tr-post__byline { margin-top: 20px; }

    .tr-post__cover { margin-top: -80px; }
    .tr-post__cover-img { aspect-ratio: 16 / 11; border-radius: 12px; }

    .tr-post__layout { margin-top: 32px; gap: 36px; }

    .tr-post__content { font-size: 17px; line-height: 1.75; }
    .tr-post__content > p:first-of-type { font-size: 1.06em; }
    .tr-post__content h2 { font-size: 22px; padding-top: 16px; }
    .tr-post__content h3 { font-size: 19px; }

    .tr-post__content .alignright,
    .tr-post__content .wp-block-image.alignright,
    .tr-post__content .alignleft,
    .tr-post__content .wp-block-image.alignleft {
        float: none;
        width: auto;
        margin: 2em 0;
    }
    .tr-post__content .tr-post__gallery { grid-template-columns: 1fr; }
    .tr-post__content .is-style-tr-cards > li { padding: 16px 18px 16px 54px; }
    .tr-post__content .is-style-tr-cards > li::before { left: 17px; top: 16px; font-size: 23px; }
    .tr-post__content .is-style-tr-callout { padding: 20px 18px 20px 23px; font-size: 16px; }
    .tr-post__content .is-style-tr-takeaway { padding: 26px 22px 26px 26px; font-size: 18px; }
    .tr-post__content .is-style-tr-takeaway::after { top: 26px; bottom: 26px; }
    .tr-video__play { width: 62px; height: 62px; }
    .tr-video__play svg { width: 24px; height: 24px; }

    .tr-post__footer { flex-direction: column; align-items: flex-start; margin-top: 44px; }
    .tr-share { margin-left: 0; }

    .tr-post__comments .comment-respond { padding: 20px; }
    .tr-post__comments .comment-form { grid-template-columns: minmax(0, 1fr); }

    .tr-post-related { margin-top: 64px; padding-bottom: 64px; }
    .tr-post-related__title { font-size: 22px; }
}
