/* ==========================================================================
   SOBO CULTURE — interior pages
   Bridges the legacy .tti-* markup onto the .so-* design system. No template
   changes: article, category, page, search, author and tag keep their PHP and
   their behaviour (share, comments, pagination), and inherit the homepage's
   type, palette and hairline chrome.

   Loaded AFTER frontend.css / home-layout.css. Selectors are prefixed with
   .so-body purely to out-specify the legacy single-class rules.
   ========================================================================== */

.so-body {
    /* A display serif is wrong for long reading. Georgia is already on every
       device, so the article body costs no extra font download. */
    --so-read: Georgia, Cambria, 'Times New Roman', serif;
}

/* ── Shell ──────────────────────────────────────────────────────────── */

.so-body .tti-container {
    max-width: calc(var(--so-container) + var(--so-gutter) * 2);
    padding-inline: var(--so-gutter);
    margin-inline: auto;
}
.so-body .tti-article-page,
.so-body .tti-cat-page,
.so-body .tti-static-page-wrap { padding-block: clamp(28px, 3.5vw, 52px) clamp(56px, 7vw, 104px); }

/* Flatten the legacy card look: no radii, no shadows, no filled panels. */
.so-body .tti-cat-list-img,
.so-body .tti-cat-overlay,
.so-body .tti-cat-overlay-img,
.so-body .tti-cat-trend-img,
.so-body .tti-sb-popular-feat-img,
.so-body .tti-sb-popular-item-img,
.so-body .tti-also-img,
.so-body .tti-art-featured-img,
.so-body .tti-art-featured-img img,
.so-body .tti-sb-block,
.so-body .tti-share-btn,
.so-body .tti-art-tag,
.so-body .tti-page,
.so-body .tti-page-arrow,
.so-body .tti-comment-item,
.so-body .tti-comment-form,
.so-body .tti-author-bio,
.so-body .tti-related-banner,
.so-body .tti-search-form {
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────── */

.so-body .tti-breadcrumb {
    font-family: var(--so-sans);
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--so-muted);
    margin-bottom: clamp(18px, 2vw, 30px);
}
.so-body .tti-breadcrumb a { color: var(--so-muted); }
.so-body .tti-breadcrumb a:hover { color: var(--so-accent); }
.so-body .tti-bc-sep { color: var(--so-hair); margin-inline: .5em; }
.so-body .tti-bc-current { color: var(--so-ink); }

/* ── Section headings: caps label + hairline, matching the homepage ─── */

/* These headings wrap their text in a child h2/h3, which keeps inheriting
   the serif from theme.cache.css. Style the wrapper AND the heading inside. */
.so-body .tti-cat-head,
.so-body .tti-comments-head,
.so-body .tti-movie-cast-head,
.so-body .tti-art-share-label {
    border: 0;
    border-bottom: 1px solid var(--so-hair);
    padding: 0 0 16px;
    margin-bottom: clamp(26px, 3vw, 40px);
    background: none;
}
.so-body .tti-cat-head,
.so-body .tti-cat-head h1, .so-body .tti-cat-head h2, .so-body .tti-cat-head h3,
.so-body .tti-comments-head, .so-body .tti-comments-head h2, .so-body .tti-comments-head h3,
.so-body .tti-movie-cast-head, .so-body .tti-movie-cast-head h2,
.so-body .tti-art-share-label {
    font-family: var(--so-sans);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--so-ink);
    line-height: 1.2;
    margin: 0;
}
.so-body .tti-cat-head::after,
.so-body .tti-cat-head::before,
.so-body .tti-cat-head h2::after,
.so-body .tti-cat-head h2::before { display: none; }   /* kill the thick accent bar */

.so-body .tti-sb-head,
.so-body .tti-sb-head h2, .so-body .tti-sb-head h3, .so-body .tti-sb-head span {
    font-family: var(--so-sans);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--so-ink);
    text-align: left;
    line-height: 1.2;
    margin: 0;
}
.so-body .tti-sb-head {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--so-hair);
    padding: 0 0 14px;
    margin-bottom: 22px;
}
.so-body .tti-sb-head::after,
.so-body .tti-sb-head::before { display: none; }

/* ── Page / category title ──────────────────────────────────────────── */

.so-body .tti-cat-title,
.so-body .tti-search-title {
    font-family: var(--so-serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: .98;
    letter-spacing: -.025em;
    color: var(--so-ink);
}
.so-body .tti-cat-desc,
.so-body .tti-search-count {
    font-family: var(--so-serif);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.6;
    color: var(--so-muted);
    margin-top: 16px;
    max-width: 58ch;
}
.so-body .tti-cat-header {
    border-bottom: 1px solid var(--so-hair);
    padding-bottom: clamp(24px, 3vw, 44px);
    margin-bottom: clamp(34px, 4vw, 60px);
    background: none;
}

/* ── Card meta ──────────────────────────────────────────────────────── */

.so-body .tti-mag-cat {
    font-family: var(--so-sans);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--so-accent);
    background: none;
    padding: 0;
    border-radius: 0;
}
.so-body .tti-mag-meta,
.so-body .tti-mag-time,
.so-body .tti-mr-arch-meta,
.so-body .tti-comment-time {
    font-family: var(--so-sans);
    font-size: .6875rem;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--so-muted);
}
/* The legacy kicker carries a decorative accent dot. The homepage kickers have
   none, and a coloured dot before every label is pure ornament. Remove it. */
.so-body .tti-mag-cat::before { display: none !important; content: none !important; }

.so-body .tti-mag-sep { color: var(--so-hair); }
.so-body .tti-mag-bookmark { color: var(--so-muted); }

/* ── Embeds ─────────────────────────────────────────────────────────
   Shorts are 9:16. Dropping them into the 16:9 box letterboxes them into
   a thin strip with black bars either side, so they get their own frame
   at a readable width instead of full column width. */

.so-body .tti-yt-embed {
    position: relative;
    width: 100%;
    /* The legacy rule sizes these with `padding-bottom: 56.25%; height: 0`.
       Percentage padding resolves against the PARENT's width, so a narrowed
       shorts frame still got the full-column height. Clear both so
       aspect-ratio actually governs. */
    padding-bottom: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-block: 2em;
    background: #000;
    overflow: hidden;
    border-radius: 0;
}
.so-body .tti-yt-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.so-body .tti-yt-embed--short {
    aspect-ratio: 9 / 16;
    width: min(100%, 360px);
    margin-inline: auto;
}
.so-body .tti-ig-embed { margin-block: 2em; }

/* ── Static pages: content reads left, at a comfortable measure ─────── */

.so-body .tti-static-page-wrap,
.so-body .tti-static-page-wrap .tti-art-content,
.so-body .tti-static-page-wrap .tti-art-body {
    text-align: left;
    margin-inline: 0;
}
.so-body .tti-static-page-wrap .tti-art-content { max-width: 68ch; }

/* ── Listing cards ──────────────────────────────────────────────────── */

.so-body .tti-cat-list-title,
.so-body .tti-cat-trend-title,
.so-body .tti-cat-overlay-title,
.so-body .tti-also-title,
.so-body .tti-sb-popular-feat-title,
.so-body .tti-sb-popular-item-title,
.so-body .tti-related-banner-title {
    font-family: var(--so-serif);
    font-weight: 400;
    letter-spacing: -.01em;
    line-height: 1.26;
}
.so-body .tti-cat-list-excerpt,
.so-body .tti-cat-overlay-excerpt,
.so-body .tti-also-body p {
    font-family: var(--so-serif);
    color: var(--so-muted);
    line-height: 1.6;
}
.so-body .tti-cat-list-item {
    border-bottom: 1px solid var(--so-hair);
    padding-bottom: clamp(22px, 2.4vw, 32px);
    margin-bottom: clamp(22px, 2.4vw, 32px);
    background: none;
}
.so-body .tti-cat-list-item:last-child { border-bottom: 0; }

/* Image hover: match the homepage's contained 1.05 scale */
.so-body .tti-cat-list-img,
.so-body .tti-cat-overlay-img,
.so-body .tti-cat-trend-img,
.so-body .tti-also-img,
.so-body .tti-sb-popular-feat-img { overflow: hidden; }
.so-body .tti-cat-list-img img,
.so-body .tti-cat-overlay-img img,
.so-body .tti-cat-trend-img img,
.so-body .tti-also-img img,
.so-body .tti-sb-popular-feat-img img {
    transition: transform 500ms var(--so-ease);
}
.so-body .tti-cat-list-item:hover .tti-cat-list-img img,
.so-body .tti-cat-overlay:hover .tti-cat-overlay-img img,
.so-body .tti-cat-trend-card:hover .tti-cat-trend-img img,
.so-body .tti-also-card:hover .tti-also-img img { transform: scale(1.05); }

/* ── Sidebar ────────────────────────────────────────────────────────── */

.so-body .tti-sb-block {
    background: none;
    border: 0;
    border-top: 1px solid var(--so-hair);
    padding: 26px 0 0;
    margin-bottom: clamp(32px, 3.4vw, 48px);
}
.so-body .tti-sb-popular-item {
    border-bottom: 1px solid var(--so-hair);
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.so-body .tti-sb-popular-item:last-child { border-bottom: 0; margin-bottom: 0; }
.so-body .tti-sb-cat-item {
    border-bottom: 1px solid var(--so-hair);
    font-family: var(--so-sans);
    font-size: .8125rem;
    letter-spacing: .04em;
}
.so-body .tti-sb-cat-count { color: var(--so-muted); font-size: .6875rem; letter-spacing: .1em; }
.so-body .tti-sb-follow,
.so-body .tti-sb-follow-icon {
    background: none;
    border: 1px solid var(--so-hair);
    border-radius: 0;
    color: var(--so-ink);
    transition: border-color .2s var(--so-ease), color .2s var(--so-ease);
}
.so-body .tti-sb-follow:hover { border-color: var(--so-accent); color: var(--so-accent); }
.so-body .tti-sb-follow-label { font-family: var(--so-sans); letter-spacing: .1em; text-transform: uppercase; font-size: .6875rem; }
.so-body .tti-sb-follow-sub  { font-family: var(--so-sans); color: var(--so-muted); font-size: .625rem; letter-spacing: .1em; }
.so-body .tti-sb-newsletter { background: var(--so-accent-tint); padding: 28px 24px; }

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

.so-body .tti-art-title {
    font-family: var(--so-serif);
    font-weight: 400;
    font-size: clamp(2rem, 3.9vw, 3.5rem);
    line-height: 1.06;
    letter-spacing: -.022em;
    color: var(--so-ink);
    text-wrap: balance;
}
.so-body .tti-art-intro {
    font-family: var(--so-serif);
    font-size: clamp(1.0625rem, 1.35vw, 1.3rem);
    line-height: 1.55;
    color: var(--so-muted);
    margin-top: 22px;
    max-width: 56ch;
}
.so-body .tti-art-header {
    border-bottom: 1px solid var(--so-hair);
    padding-bottom: clamp(22px, 2.6vw, 34px);
    margin-bottom: clamp(26px, 3vw, 42px);
}
.so-body .tti-art-byline,
.so-body .tti-art-byline-meta {
    font-family: var(--so-sans);
    font-size: .6875rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--so-muted);
}
.so-body .tti-art-byline-name { color: var(--so-ink); font-weight: 600; }
.so-body .tti-art-avatar {
    border-radius: 50%;
    background: var(--so-accent-tint);
    color: var(--so-accent);
    font-family: var(--so-serif);
}

/* Long-form body copy */
.so-body .tti-art-content {
    font-family: var(--so-read);
    font-size: clamp(1.0625rem, 1.15vw, 1.1875rem);
    line-height: 1.78;
    color: var(--so-ink);
    max-width: 68ch;
}
.so-body .tti-art-content p { margin-bottom: 1.5em; }
.so-body .tti-art-content h2,
.so-body .tti-art-content h3,
.so-body .tti-art-content h4 {
    font-family: var(--so-serif);
    font-weight: 400;
    letter-spacing: -.015em;
    line-height: 1.2;
    color: var(--so-ink);
    margin: 2em 0 .6em;
}
.so-body .tti-art-content h2 { font-size: 1.75rem; }
.so-body .tti-art-content h3 { font-size: 1.375rem; }
.so-body .tti-art-content a { color: var(--so-accent); text-decoration: underline; text-underline-offset: 3px; }
.so-body .tti-art-content blockquote {
    border-left: 2px solid var(--so-accent);
    padding-left: clamp(18px, 2vw, 28px);
    margin: 2em 0;
    font-family: var(--so-serif);
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--so-ink);
}
.so-body .tti-art-content img { margin-block: 2em; }
.so-body .tti-art-content ul,
.so-body .tti-art-content ol { margin: 0 0 1.5em 1.25em; }
.so-body .tti-art-content li { margin-bottom: .5em; list-style: inherit; }
.so-body .tti-art-content ul { list-style: disc; }
.so-body .tti-art-content ol { list-style: decimal; }

/* Share, tags */
.so-body .tti-share-btn,
.so-body .tti-author-social-btn {
    background: none;
    border: 1px solid var(--so-hair);
    color: var(--so-ink);
    transition: border-color .2s var(--so-ease), color .2s var(--so-ease);
}
/* One hover for every share target. The legacy sheet gave each button its
   own brand colour (#1877f2, #25d366, …), which pulled six off-palette
   colours onto the page. All of them now fill with the accent. */
.so-body .tti-share-btn:hover,
.so-body .tti-share-btn:focus-visible,
.so-body .tti-share-btn.is-fb:hover,
.so-body .tti-share-btn.is-tw:hover,
.so-body .tti-share-btn.is-li:hover,
.so-body .tti-share-btn.is-wa:hover,
.so-body .tti-share-btn.is-tg:hover,
.so-body .tti-share-btn.is-pi:hover,
.so-body .tti-share-btn.is-copy:hover,
.so-body .tti-share-btn.is-fb:focus-visible,
.so-body .tti-share-btn.is-tw:focus-visible,
.so-body .tti-share-btn.is-li:focus-visible,
.so-body .tti-share-btn.is-wa:focus-visible,
.so-body .tti-share-btn.is-tg:focus-visible,
.so-body .tti-share-btn.is-pi:focus-visible,
.so-body .tti-author-social-btn:hover,
.so-body .tti-author-social-btn:focus-visible {
    background: var(--so-accent);
    border-color: var(--so-accent);
    color: #fff;
}
.so-body .tti-share-btn:hover svg,
.so-body .tti-share-btn:focus-visible svg,
.so-body .tti-author-social-btn:hover svg { color: #fff; fill: currentColor; }
/* "Copied" is confirmation, not hover: keep it distinct but on-palette. */
.so-body .tti-share-btn.is-copy.is-copied {
    background: var(--so-ink);
    border-color: var(--so-ink);
    color: #fff;
}

/* Avatar initial: .tti-author-bio-avatar sets display:block LATER in the
   legacy sheet than .tti-art-avatar-fallback sets display:flex, at equal
   specificity, so the centring lost and the letter sat at the top-left. */
.so-body .tti-art-avatar-fallback,
.so-body .tti-author-bio-avatar.tti-art-avatar-fallback {
    display: grid;
    place-items: center;
    font-family: var(--so-serif);
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    color: var(--so-accent);
    background: var(--so-accent-tint);
    overflow: hidden;
}
.so-body .tti-art-avatar.tti-art-avatar-fallback        { font-size: 1.15rem; }
.so-body .tti-author-bio-avatar.tti-art-avatar-fallback { font-size: 1.85rem; }
.so-body .tti-art-share-label {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}
.so-body .tti-art-share-bottom {
    border-top: 1px solid var(--so-hair);
    border-bottom: 1px solid var(--so-hair);
    padding-block: 22px;
    margin-block: clamp(34px, 4vw, 52px);
}
.so-body .tti-art-tag {
    font-family: var(--so-sans);
    font-size: .625rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: none;
    border: 1px solid var(--so-hair);
    color: var(--so-muted);
    padding: 8px 13px;
}
.so-body .tti-art-tag:hover { border-color: var(--so-accent); color: var(--so-accent); }

/* Author bio, related, comments */
.so-body .tti-author-bio,
.so-body .tti-related-banner {
    background: none;
    border-top: 1px solid var(--so-hair);
    border-bottom: 1px solid var(--so-hair);
    padding-block: clamp(26px, 3vw, 38px);
}
/* Alignment follows the content. With a bio the name sits at the top and the
   text runs beneath it; with no bio the name centres against the avatar rather
   than hanging at the top of a 70px row. Centred is the default so browsers
   without :has() degrade to the better-looking case. */
.so-body .tti-author-bio { align-items: center; }
.so-body .tti-author-bio:has(.tti-author-bio-text) { align-items: flex-start; }

.so-body .tti-author-bio-name {
    font-family: var(--so-serif);
    font-weight: 400;
    font-size: 1.35rem;
    margin-bottom: 0;                 /* legacy 6px would dangle with no bio */
}
.so-body .tti-author-bio:has(.tti-author-bio-text) .tti-author-bio-name { margin-bottom: 6px; }
.so-body .tti-author-bio-text { font-family: var(--so-serif); color: var(--so-muted); line-height: 1.6; }
.so-body .tti-related-banner-label,
.so-body .tti-toc-head {
    font-family: var(--so-sans);
    font-size: .625rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--so-accent);
}
.so-body .tti-comment-item {
    background: none;
    border-bottom: 1px solid var(--so-hair);
    padding: 0 0 22px;
    margin-bottom: 22px;
}
.so-body .tti-comment-head { font-family: var(--so-sans); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.so-body .tti-comment-msg  { font-family: var(--so-read); line-height: 1.7; color: var(--so-ink); }
.so-body .tti-comment-form { background: var(--so-accent-tint); padding: clamp(24px, 3vw, 34px); }
.so-body .tti-comment-form input,
.so-body .tti-comment-form textarea,
.so-body .tti-search-form input {
    border-radius: 0;
    border: 1px solid var(--so-hair);
    background: var(--so-canvas);
    font-family: var(--so-sans);
    color: var(--so-ink);
}
.so-body .tti-comment-form input:focus,
.so-body .tti-comment-form textarea:focus,
.so-body .tti-search-form input:focus { outline: none; border-color: var(--so-accent); }
.so-body .tti-comment-submit,
.so-body .tti-search-empty-btn {
    border-radius: 0;
    background: var(--so-ink);
    color: var(--so-canvas);
    font-family: var(--so-sans);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    border: 1px solid var(--so-ink);
    transition: background-color .2s var(--so-ease), border-color .2s var(--so-ease);
}
.so-body .tti-comment-submit:hover,
.so-body .tti-search-empty-btn:hover { background: var(--so-accent); border-color: var(--so-accent); }

/* ── Pagination ─────────────────────────────────────────────────────── */

.so-body .tti-page,
.so-body .tti-page-arrow {
    background: none;
    border: 1px solid var(--so-hair);
    color: var(--so-ink);
    font-family: var(--so-sans);
    font-size: .75rem;
    letter-spacing: .08em;
    transition: border-color .2s var(--so-ease), color .2s var(--so-ease);
}
.so-body .tti-page:hover,
.so-body .tti-page-arrow:hover { border-color: var(--so-accent); color: var(--so-accent); }
.so-body .tti-page.is-active,
.so-body .tti-page.active {
    background: var(--so-ink);
    border-color: var(--so-ink);
    color: var(--so-canvas);
}
.so-body .tti-pagination {
    border-top: 1px solid var(--so-hair);
    padding-top: clamp(26px, 3vw, 38px);
    margin-top: clamp(34px, 4vw, 52px);
}

/* ── Search ─────────────────────────────────────────────────────────── */

.so-body .tti-search-header {
    border-bottom: 1px solid var(--so-hair);
    padding-bottom: clamp(24px, 3vw, 40px);
    margin-bottom: clamp(30px, 3.6vw, 52px);
}
.so-body .tti-search-q { color: var(--so-accent); font-style: normal; }
.so-body .tti-search-empty { text-align: left; }
.so-body .tti-search-empty-icon { color: var(--so-hair); }

/* ── Overlay cards keep white text on their scrim ───────────────────── */

.so-body .tti-cat-overlay-title,
.so-body .tti-cat-overlay-title a,
.so-body .tti-cat-overlay-body .tti-mag-meta,
.so-body .tti-cat-overlay-body .tti-mag-time,
.so-body .tti-cat-overlay-excerpt { color: #fff; }
.so-body .tti-cat-overlay-body .tti-mag-cat { color: #fff; }

/* ── Dark mode: the legacy panels follow the same tokens ────────────── */

/* Driven by html.dark, same signal as sobo.css and as the legacy sheet's own
   html.dark rules, so all three layers switch together. */
html.dark .so-body .tti-art-content,
html.dark .so-body .tti-comment-msg,
html.dark .so-body .tti-art-title,
html.dark .so-body .tti-art-intro,
html.dark .so-body .tti-cat-title,
html.dark .so-body .tti-search-title,
html.dark .so-body .tti-cat-list-title,
html.dark .so-body .tti-cat-trend-title,
html.dark .so-body .tti-also-title,
html.dark .so-body .tti-sb-popular-feat-title,
html.dark .so-body .tti-sb-popular-item-title,
html.dark .so-body .tti-author-bio-name,
html.dark .so-body .tti-art-byline-name { color: var(--so-ink); }

html.dark .so-body .tti-cat-list-excerpt,
html.dark .so-body .tti-author-bio-text,
html.dark .so-body .tti-cat-desc,
html.dark .so-body .tti-art-content h2,
html.dark .so-body .tti-art-content h3,
html.dark .so-body .tti-art-content h4 { color: var(--so-ink); }
html.dark .so-body .tti-cat-list-excerpt,
html.dark .so-body .tti-author-bio-text { color: var(--so-muted); }

html.dark .so-body .tti-sb-newsletter,
html.dark .so-body .tti-comment-form { background: var(--so-accent-tint); }
html.dark .so-body .tti-comment-form input,
html.dark .so-body .tti-comment-form textarea,
html.dark .so-body .tti-search-form input { background: transparent; color: var(--so-ink); }
html.dark .so-body .tti-comment-submit,
html.dark .so-body .tti-search-empty-btn { background: var(--so-accent); border-color: var(--so-accent); color: #fff; }
html.dark .so-body .tti-page.is-active,
html.dark .so-body .tti-page.active { background: var(--so-accent); border-color: var(--so-accent); color: #fff; }
html.dark .so-body .tti-author-bio,
html.dark .so-body .tti-related-banner,
html.dark .so-body .tti-comment-item,
html.dark .so-body .tti-sb-block { background: none; }
html.dark .so-body .tti-share-btn,
html.dark .so-body .tti-page,
html.dark .so-body .tti-page-arrow,
html.dark .so-body .tti-art-tag { color: var(--so-ink); border-color: var(--so-hair); }
