/* ============================================================================
   theme-factory kit — blog.css (KIT-BLOG lane)
   Tokens only (no hex, no font literal). Scoped to tf- blog classes.
   1. page head + shared bits (meta, breadcrumb, tags, aside)
   2. post cards (PostCard variants)
   3. post-list layouts   [data-tf-post-list=grid|list-ruled|magazine|sidebar|index-table]
   4. single layouts      [data-tf-single=classic|hero|sidebar-toc|wide-media|editorial-sticky]
   5. TOC, author, share, prev/next, related, newsletter
   6. search page
   ========================================================================== */

/* 1. Page head + shared ---------------------------------------------------- */
.tf-pagehead { display: grid; gap: var(--tf-space-3); margin-block-end: var(--tf-space-7); max-width: 60rem; }
.tf-pagehead .tf-h1 { margin-block-start: var(--tf-space-1); }
.tf-pagehead__intro { margin-block-start: var(--tf-space-1); }
.tf-pagehead__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tf-space-3) var(--tf-space-5); margin-block-start: var(--tf-space-4); padding-block-start: var(--tf-space-4); border-top: var(--tf-rule); }
.tf-pagehead__page { margin-inline-start: auto; font-size: var(--tf-step--1); }
.tf-pagehead__crumbs { margin-block-end: var(--tf-space-4); }

.tf-breadcrumb__list { display: flex; flex-wrap: wrap; gap: var(--tf-space-2); }
.tf-breadcrumb__list li { display: inline-flex; gap: var(--tf-space-2); align-items: center; }
.tf-breadcrumb__list li + li::before { content: "/"; color: var(--tf-ink-muted); }
.tf-breadcrumb [aria-current] { color: var(--tf-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.tf-breadcrumb a:hover { color: var(--tf-accent-text); }

.tf-meta { display: flex; align-items: center; gap: var(--tf-space-3); font-size: var(--tf-step--1); color: var(--tf-ink-muted); }
.tf-meta__lines { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--tf-space-2); min-width: 0; }
.tf-meta__author { color: var(--tf-ink); font-weight: 600; }
.tf-meta__author::after { content: "·"; margin-inline-start: var(--tf-space-2); color: var(--tf-ink-muted); font-weight: 400; }
.tf-meta__row { display: inline-flex; flex-wrap: wrap; gap: 0 var(--tf-space-2); }
.tf-meta--stack .tf-meta__lines { flex-direction: column; gap: var(--tf-space-1); }
.tf-meta--stack .tf-meta__author::after { content: none; }

.tf-cats__list { display: flex; flex-wrap: wrap; gap: var(--tf-space-2); }
.tf-cats__count { font-family: var(--tf-font-label); font-size: 0.8em; color: var(--tf-ink-muted); margin-inline-start: 0.2em; }
.tf-cats--list .tf-cats__list { flex-direction: column; gap: 0; }
.tf-cats--list .tf-tag { display: flex; justify-content: space-between; border: 0; border-bottom: var(--tf-rule); border-radius: 0; padding: 0.55em 0; color: var(--tf-ink); }
.tf-cats--list .tf-tag[aria-current], .tf-cats--list .tf-tag:hover { color: var(--tf-accent-text); }
.tf-cats__title, .tf-aside__title { margin-block-end: var(--tf-space-3); }
.tf-tag { min-height: 2.25rem; display: inline-flex; align-items: center; }

.tf-aside { display: grid; gap: var(--tf-space-6); align-content: start; }
.tf-aside__posts { display: grid; gap: var(--tf-space-2); counter-reset: none; }
.tf-aside__posts .tf-post--compact { padding: var(--tf-space-3) 0; border: 0; border-bottom: var(--tf-rule); border-radius: 0; background: transparent; box-shadow: none; }
.tf-aside__posts .tf-post--compact .tf-card__body { padding: 0; gap: var(--tf-space-1); }
.tf-aside__posts .tf-post--compact .tf-post__title { font-size: var(--tf-step-0); }

.tf-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.tf-table-wrap > table { display: table; min-width: 100%; }

/* 2. Post cards ------------------------------------------------------------ */
.tf-post { padding: 0; }
.tf-post__body { flex: 1 1 auto; }
.tf-post__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tf-space-2) var(--tf-space-3); }
.tf-post__title { font-size: var(--tf-step-1); }
.tf-post__title--lg { font-size: var(--tf-step-3); }
.tf-post__excerpt { color: var(--tf-ink-muted); font-size: var(--tf-step-0); line-height: 1.5; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tf-post__more { font-weight: 600; color: var(--tf-accent-text); margin-block-start: auto; }
.tf-post .tf-card__media img { transition: transform calc(var(--tf-dur) * 3) var(--tf-ease); }
.tf-post:hover .tf-card__media img { transform: scale(1.03); }
.tf-post--horizontal { flex-direction: row; align-items: stretch; }
.tf-post--horizontal .tf-post__media { flex: 0 0 38%; min-width: 0; }
.tf-post--horizontal .tf-post__media img { height: 100%; aspect-ratio: auto; min-height: 10rem; }
.tf-post--horizontal .tf-post__excerpt { -webkit-line-clamp: 2; }
.tf-post--featured { --tf-card-ratio: 16 / 10; }
.tf-post--featured .tf-post__excerpt { -webkit-line-clamp: 4; font-size: var(--tf-lead); line-height: 1.5; }
.tf-post--compact .tf-post__title { font-size: var(--tf-step-0); }
@media (max-width: 40rem) { .tf-post--horizontal { flex-direction: column; } .tf-post--horizontal .tf-post__media { flex-basis: auto; } .tf-post--horizontal .tf-post__media img { aspect-ratio: var(--tf-card-ratio, 3 / 2); min-height: 0; } }
[data-tf-card="tile"] .tf-post .tf-post__excerpt { color: var(--tf-dark-muted); }

/* 3. Post-list layouts ----------------------------------------------------- */
.tf-postlist { margin-block-end: var(--tf-space-7); }
.tf-bloglist__pagination { margin-block-start: var(--tf-space-6); }
.tf-pagination__arrow { display: inline-flex !important; align-items: center; gap: 0.4em; white-space: nowrap; }
.tf-pagination__arrow[aria-disabled] { color: var(--tf-ink-muted); }
.tf-bloglist__newsletter, .tf-single__newsletter { margin-block-start: var(--tf-space-8); }
/* the newsletter band closes the section: drop the section's bottom padding so the band meets the footer
   (an ivory strip between a dark band and a dark footer read as a bug on law-firm) */
.tf-section:has(> .tf-bloglist__newsletter:last-child), .tf-section:has(> .tf-single__newsletter:last-child) { padding-block-end: 0; }

/* grid */
.tf-postlist__grid { grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); gap: var(--tf-space-5); }
@media (min-width: 60rem) { .tf-postlist__grid { grid-template-columns: repeat(3, 1fr); } }

/* list-ruled: date column · text · thumb, hairline rules that follow the rule motif */
.tf-postlist__ruled { display: grid; border-top: var(--tf-rule); }
.tf-ruled { display: grid; grid-template-columns: 1fr; gap: var(--tf-space-3) var(--tf-space-6); padding-block: var(--tf-space-5); border-bottom: var(--tf-rule); position: relative; }
.tf-ruled__when { display: grid; gap: var(--tf-space-2); align-content: start; font-size: var(--tf-step--1); color: var(--tf-ink-muted); font-family: var(--tf-font-label); min-width: 0; }
.tf-ruled__when .tf-label { overflow: hidden; }
.tf-ruled__main { display: grid; gap: var(--tf-space-2); min-width: 0; }
.tf-ruled__title { font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-2); line-height: 1.15; letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); text-wrap: balance; }
.tf-ruled__title a { text-decoration: none; }
.tf-ruled__title a::after { content: ""; position: absolute; inset: 0; }
.tf-ruled:hover .tf-ruled__title a { color: var(--tf-accent-text); }
.tf-ruled__excerpt { color: var(--tf-ink-muted); max-width: 60ch; text-wrap: pretty; }
.tf-ruled__meta { font-size: var(--tf-step--1); }
.tf-ruled__thumb { display: none; }
@media (min-width: 48rem) {
  /* fixed first column so every row's title starts on the same x (a per-row fit-content column misaligned the list);
     12rem fits "[06] ESTATES & FAMILIES" with room — the nowrap label is clipped beyond that, never broken mid-glyph */
  .tf-ruled { grid-template-columns: 12rem minmax(0, 1fr) 9rem; align-items: start; }
  .tf-ruled--text { grid-template-columns: 12rem minmax(0, 1fr); }
  .tf-ruled__thumb { display: block; }
  .tf-ruled__thumb img { aspect-ratio: 3 / 2; transition: transform calc(var(--tf-dur) * 2) var(--tf-ease), filter var(--tf-dur) var(--tf-ease); }
  .tf-ruled:hover .tf-ruled__thumb img { transform: scale(1.04); }
}
[data-tf-rule="none"] .tf-postlist__ruled { border-top: 0; }
[data-tf-rule="none"] .tf-ruled { border-bottom: 0; }
[data-tf-rule="none"] .tf-ruled:nth-child(even) { background: var(--tf-surface-2); }
[data-tf-rule="none"] .tf-ruled { padding-inline: var(--tf-space-4); }

/* magazine: lead card (media left · text right) + 2-col horizontals */
.tf-postlist__mag { display: grid; gap: var(--tf-space-6); }
.tf-postlist__lead { display: grid; grid-template-columns: 1fr; }
.tf-postlist__lead .tf-post__media img { aspect-ratio: 16 / 10; height: 100%; }
.tf-postlist__lead .tf-card__body { justify-content: center; gap: var(--tf-space-4); }
.tf-postlist__mag-grid { grid-template-columns: 1fr; gap: var(--tf-space-5); }
@media (min-width: 48rem) { .tf-postlist__mag-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) {
  .tf-postlist__lead { grid-template-columns: 7fr 5fr; }
  /* the media column fills the height the TEXT column sets (never the other way round): an in-flow img let a portrait
     pool image dictate a ~1100px card with a mostly empty text column (fashion-store, vn-tiem-banh). Tile cards
     already position their media absolutely (motifs.css) — leave them alone. */
  :root:not([data-tf-card="tile"]) .tf-postlist__lead .tf-post__media { position: relative; min-height: 26rem; overflow: hidden; }
  :root:not([data-tf-card="tile"]) .tf-postlist__lead .tf-post__media img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; object-fit: cover; }
  .tf-postlist__lead .tf-card__body { padding: var(--tf-space-6); }
}
[data-tf-card="tile"] .tf-postlist__lead { display: flex; min-height: 30rem; }

/* sidebar */
.tf-postlist__with-aside { display: grid; grid-template-columns: 1fr; gap: var(--tf-space-7); align-items: start; }
.tf-postlist__stream { display: grid; gap: var(--tf-space-5); min-width: 0; }
@media (min-width: 60rem) { .tf-postlist__with-aside { grid-template-columns: minmax(0, 1fr) 18rem; gap: var(--tf-space-7) var(--tf-space-8); } .tf-postlist__with-aside .tf-aside { position: sticky; top: calc(var(--tf-header-h) + var(--tf-space-4)); } }

/* index-table: hairline table, hover peek */
.tf-index { font-size: var(--tf-step-0); border-top: var(--tf-rule); }
.tf-index th { font-family: var(--tf-font-label); font-size: var(--tf-label-size); font-weight: 500; letter-spacing: var(--tf-label-tracking); text-transform: var(--tf-label-case); color: var(--tf-ink-muted); text-align: start; padding: var(--tf-space-3) var(--tf-space-3); border-bottom: var(--tf-rule); white-space: nowrap; }
.tf-index td { padding: var(--tf-space-4) var(--tf-space-3); border-bottom: var(--tf-rule); vertical-align: top; }
.tf-index__row { position: relative; transition: background var(--tf-dur) var(--tf-ease); }
.tf-index__row:hover, .tf-index__row:focus-within { background: var(--tf-surface); }
.tf-index__n { width: 3.5rem; font-family: var(--tf-font-label); color: var(--tf-ink-muted); }
.tf-index__n .tf-label:empty::before { content: attr(data-n); }
.tf-index__date { width: 8rem; white-space: nowrap; font-family: var(--tf-font-label); font-size: var(--tf-step--1); color: var(--tf-ink-muted); }
.tf-index__year { color: var(--tf-ink-muted); }
.tf-index__title { min-width: 16rem; }
.tf-index__title > a { display: block; font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-1); line-height: 1.2; text-decoration: none; letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); }
.tf-index__title > a::after { content: ""; position: absolute; inset: 0; }
.tf-index__row:hover .tf-index__title > a { color: var(--tf-accent-text); }
.tf-index__excerpt { display: block; font-size: var(--tf-step--1); margin-block-start: var(--tf-space-1); max-width: 56ch; }
.tf-index__topic { width: 10rem; white-space: nowrap; }
.tf-index__topic .tf-tag { position: relative; z-index: 1; }
.tf-index__read { width: 5.5rem; white-space: nowrap; font-family: var(--tf-font-label); font-size: var(--tf-step--1); color: var(--tf-ink-muted); text-align: end; }
.tf-index__peek { display: none; }
@media (min-width: 64rem) and (hover: hover) {
  .tf-index__peek { display: block; position: absolute; inset-inline-end: var(--tf-space-4); top: 50%; width: 11rem; pointer-events: none; z-index: 2; opacity: 0; transform: translateY(-50%) rotate(-3deg) scale(0.92); transition: opacity var(--tf-dur) var(--tf-ease), transform calc(var(--tf-dur) * 1.5) var(--tf-ease); }
  .tf-index__peek img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--tf-img-radius); box-shadow: 0 18px 40px -12px color-mix(in oklab, var(--tf-ink) 45%, transparent); filter: var(--tf-img-filter); }
  .tf-index__row:hover .tf-index__peek { opacity: 1; transform: translateY(-50%) rotate(2deg) scale(1); }
}
@media (max-width: 47.99rem) {
  .tf-index thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tf-index, .tf-index tbody { display: block; }
  .tf-index__row { display: grid; grid-template-columns: auto 1fr; gap: var(--tf-space-2) var(--tf-space-3); padding-block: var(--tf-space-4); border-bottom: var(--tf-rule); }
  .tf-index td { display: block; padding: 0; border: 0; width: auto; min-width: 0; white-space: normal; }
  .tf-index__title { grid-column: 1 / -1; }
  .tf-index__topic, .tf-index__read { grid-column: 1 / -1; text-align: start; }
  .tf-index__topic { margin-block-start: var(--tf-space-1); }
  .tf-index__excerpt { display: none; }
}
[data-tf-rule="none"] .tf-index tbody tr:nth-child(even) { background: var(--tf-surface-2); }
[data-tf-rule="thick-accent"] .tf-index thead th { border-bottom: 3px solid var(--tf-accent); }

/* 4. Single layouts -------------------------------------------------------- */
.tf-single { padding-block-start: 0; }
.tf-single__frame { padding-block-start: var(--tf-section-y); display: grid; gap: var(--tf-space-6); grid-template-columns: minmax(0, 1fr); }
.tf-single__head { display: grid; gap: var(--tf-space-3); max-width: 50rem; }
.tf-single__title { margin-block-start: var(--tf-space-1); }
.tf-single__excerpt { margin-block-start: var(--tf-space-1); }
.tf-single__meta { margin-block-start: var(--tf-space-3); }
.tf-single__crumbs { margin-block-end: var(--tf-space-2); }
.tf-single__cover { margin-block: var(--tf-space-2) var(--tf-space-4); }
.tf-single__cover img { aspect-ratio: 16 / 9; }
.tf-single__body { display: grid; gap: var(--tf-space-6); min-width: 0; }
/* grid children must not size the track (CONTRACT §8): the <details> TOC's content contribution grew the auto track past
   375px and dragged the layout viewport to 415/464px once body overflow-wrap stopped being `anywhere` */
.tf-single__frame > *, .tf-single__body > * { min-width: 0; }
.tf-toc--details { min-width: 0; max-width: 100%; }
.tf-single__prose { width: 100%; }
.tf-single__foot { display: grid; gap: var(--tf-space-6); max-width: var(--tf-measure); padding-block-start: var(--tf-space-6); border-top: var(--tf-rule); }
.tf-single__tags { display: flex; flex-wrap: wrap; gap: var(--tf-space-2); }
.tf-single__after { display: grid; gap: var(--tf-space-8); margin-block-start: var(--tf-space-8); }
.tf-single__toc { max-width: var(--tf-measure); width: 100%; }
.tf-single__foot { width: 100%; }

/* short read (no markdown body): the excerpt becomes a display-set standfirst between two rules, then a hand-off card to
   the pack's long read + a contact CTA. Replaces the empty prose frame (+ its gap) so a brief looks intended. */
.tf-single__brief { display: grid; gap: var(--tf-space-5); max-width: var(--tf-measure); width: 100%; padding-block: var(--tf-space-6); border-block-start: var(--tf-rule); }
.tf-single__brief-text { font-family: var(--tf-font-display); font-weight: min(var(--tf-display-weight), 500); font-size: var(--tf-step-2); line-height: max(1.3, var(--tf-display-leading)); letter-spacing: var(--tf-display-tracking); color: var(--tf-ink); text-wrap: pretty; max-width: 34em; }
.tf-single__brief-actions { display: grid; gap: var(--tf-space-4); justify-items: start; margin-block-start: var(--tf-space-2); }
.tf-single__brief-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--tf-space-1) var(--tf-space-4); align-items: center; width: 100%; padding: var(--tf-space-5); text-decoration: none; color: var(--tf-ink); background: var(--tf-surface); border: var(--tf-card-border); border-radius: var(--tf-card-radius); box-shadow: var(--tf-card-shadow); transition: border-color var(--tf-dur) var(--tf-ease), transform var(--tf-dur) var(--tf-ease); }
.tf-single__brief-next:hover { border-color: var(--tf-accent); transform: translateY(-2px); }
.tf-single__brief-kicker { grid-column: 1; font-family: var(--tf-font-label); font-size: var(--tf-label-size); letter-spacing: var(--tf-label-tracking); text-transform: var(--tf-label-case); color: var(--tf-ink-muted); }
.tf-single__brief-title { grid-column: 1; font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-1); line-height: 1.2; letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); text-wrap: balance; }
.tf-single__brief-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: var(--tf-step-2); color: var(--tf-accent-text); transition: transform var(--tf-dur) var(--tf-ease); }
.tf-single__brief-next:hover .tf-single__brief-arrow { transform: translateX(4px); }
.tf-single--short .tf-single__foot { border-top: 0; padding-block-start: 0; }
[data-tf-single="classic"] .tf-single__brief, [data-tf-single="hero"] .tf-single__brief, [data-tf-single="wide-media"] .tf-single__brief { margin-inline: auto; }

/* prose extras: figures + tables from enhanceProse; K5 numbers come from base.css .tf-prose */
.tf-prose__figure { margin-block: 2em; }
.tf-prose__figure figcaption { font-family: var(--tf-font-label); }
.tf-prose .tf-table-wrap { margin-block: 1.5em; border-block: var(--tf-rule); }
.tf-prose .tf-table-wrap table { display: table; font-size: var(--tf-step--1); }
.tf-prose .tf-table-wrap tr:last-child td { border-bottom: 0; }
.tf-prose blockquote { margin-block: 1.75em; }
.tf-prose blockquote p:first-of-type::before { content: "“"; color: var(--tf-accent-2); margin-inline-end: 0.05em; }
.tf-prose blockquote p:last-of-type::after { content: "”"; color: var(--tf-accent-2); }
.tf-prose > h2 { scroll-margin-top: calc(var(--tf-header-h) + var(--tf-space-4)); }
.tf-prose > h3 { scroll-margin-top: calc(var(--tf-header-h) + var(--tf-space-4)); }
.tf-prose ol > li::marker { font-family: var(--tf-font-label); color: var(--tf-accent-text); }
.tf-prose ul > li::marker { color: var(--tf-accent-2); }

/* classic: everything centred on the measure */
[data-tf-single="classic"] .tf-single__frame { justify-items: center; }
[data-tf-single="classic"] .tf-single__head, [data-tf-single="classic"] .tf-single__body, [data-tf-single="classic"] .tf-single__cover { width: 100%; max-width: calc(var(--tf-measure) + 4rem); }
[data-tf-single="classic"] .tf-single__head { text-align: center; justify-items: center; }
[data-tf-single="classic"] .tf-single__head .tf-breadcrumb__list { justify-content: center; }
[data-tf-single="classic"] .tf-single__head .tf-label, [data-tf-single="wide-media"] .tf-single__head .tf-label { justify-self: center; }
[data-tf-single="classic"] .tf-single__meta { justify-content: center; }
[data-tf-single="classic"] .tf-single__prose, [data-tf-single="classic"] .tf-single__foot, [data-tf-single="classic"] .tf-single__toc { margin-inline: auto; }

/* hero: full-bleed image with the title over a dark scrim (inverse tokens) */
.tf-single__hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: min(78vh, 44rem); color: var(--tf-dark-ink); --tf-ink: var(--tf-dark-ink); --tf-ink-muted: var(--tf-dark-muted); --tf-accent-text: var(--tf-dark-muted); }
.tf-single__hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: var(--tf-img-filter); }
/* scrim never drops below 48% at the top: breadcrumb + label sit there and must read on a light/busy photo */
.tf-single__hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, color-mix(in oklab, var(--tf-dark-bg) 94%, transparent) 0%, color-mix(in oklab, var(--tf-dark-bg) 72%, transparent) 55%, color-mix(in oklab, var(--tf-dark-bg) 48%, transparent) 100%); }
.tf-single__hero-inner { display: grid; gap: var(--tf-space-3); padding-block: var(--tf-space-7) var(--tf-space-6); max-width: 60rem; margin-inline: auto; }
.tf-single__hero .tf-single__excerpt { font-size: var(--tf-lead); max-width: var(--tf-measure); color: var(--tf-dark-ink); opacity: 0.9; }
.tf-single__hero .tf-breadcrumb [aria-current] { color: var(--tf-dark-ink); }
/* label over the photo: a mapped label slot class (`.eyebrow{color:var(--amber)}` in chrome.css) would otherwise paint its
   light-ground colour here. (0,3,0) beats a slot class and a one-ancestor chrome rule; a skin that wants a brand hue on
   the scrim sets the optional `--tf-hero-label` (must be ≥4.5:1 on --tf-dark-bg). */
.tf-single__hero .tf-single__hero-inner > .tf-label { color: var(--tf-hero-label, var(--tf-dark-muted)); }
.tf-single__hero .tf-meta__author { color: var(--tf-dark-ink); }
.tf-single__hero .tf-avatar--initials { background: color-mix(in oklab, var(--tf-dark-ink) 15%, transparent); color: var(--tf-dark-ink); }
[data-tf-single="hero"] .tf-single__frame { justify-items: center; }
[data-tf-single="hero"] .tf-single__body { width: 100%; max-width: calc(var(--tf-measure) + 4rem); }
[data-tf-single="hero"] .tf-single__prose, [data-tf-single="hero"] .tf-single__foot, [data-tf-single="hero"] .tf-single__toc { margin-inline: auto; }
[data-tf-single="hero"] .tf-h1--hero { font-size: var(--tf-step-5); max-width: 18ch; }

/* sidebar-toc: prose left · sticky TOC + share right */
.tf-single__aside { min-width: 0; }
.tf-single__sticky { display: grid; gap: var(--tf-space-6); }
@media (min-width: 60rem) {
  [data-tf-single="sidebar-toc"] .tf-single__frame, [data-tf-single="editorial-sticky"] .tf-single__frame { grid-template-columns: minmax(0, 1fr) 16rem; column-gap: var(--tf-space-8); }
  [data-tf-single="sidebar-toc"] .tf-single__head, [data-tf-single="sidebar-toc"] .tf-single__cover { grid-column: 1 / -1; }
  [data-tf-single="sidebar-toc"] .tf-single__aside { grid-column: 2; grid-row: 3; }
  [data-tf-single="sidebar-toc"] .tf-single__body { grid-column: 1; grid-row: 3; }
  .tf-single__sticky { position: sticky; top: calc(var(--tf-header-h) + var(--tf-space-5)); }
}
[data-tf-single="sidebar-toc"] .tf-single__head { max-width: 60rem; }

/* wide-media: cover and figures break out past the measure; text stays centred */
[data-tf-single="wide-media"] .tf-single__frame { justify-items: center; }
[data-tf-single="wide-media"] .tf-single__head { text-align: center; justify-items: center; max-width: 56rem; }
[data-tf-single="wide-media"] .tf-single__head .tf-breadcrumb__list { justify-content: center; }
[data-tf-single="wide-media"] .tf-single__meta { justify-content: center; }
[data-tf-single="wide-media"] .tf-single__cover { width: 100%; max-width: var(--tf-container-wide); }
[data-tf-single="wide-media"] .tf-single__cover img { aspect-ratio: 21 / 9; }
[data-tf-single="wide-media"] .tf-single__body { width: 100%; max-width: calc(var(--tf-measure) + 4rem); justify-items: center; }
[data-tf-single="wide-media"] .tf-single__prose, [data-tf-single="wide-media"] .tf-single__foot, [data-tf-single="wide-media"] .tf-single__toc { margin-inline: auto; width: 100%; }
@media (min-width: 60rem) {
  [data-tf-single="wide-media"] .tf-prose__figure, [data-tf-single="wide-media"] .tf-prose .tf-table-wrap, [data-tf-single="wide-media"] .tf-prose > blockquote { --_w: min(64rem, calc(100vw - 2 * var(--tf-gutter) - 1rem)); width: var(--_w); margin-inline: calc((100% - var(--_w)) / 2); }
  [data-tf-single="wide-media"] .tf-prose__figure img { aspect-ratio: 2 / 1; object-fit: cover; }
  [data-tf-single="wide-media"] .tf-prose > blockquote { text-align: center; border-inline-start: 0; border-block: var(--tf-rule); border-radius: 0; font-size: var(--tf-step-2); padding: var(--tf-space-6) var(--tf-space-6); }
}

/* editorial-sticky: facts column sticks on the left, prose on the right */
.tf-single__facts { display: grid; gap: var(--tf-space-4); padding-block-end: var(--tf-space-5); border-bottom: var(--tf-rule); }
.tf-single__facts > div { display: grid; gap: var(--tf-space-1); }
.tf-single__facts dd { font-size: var(--tf-step--1); }
.tf-single__facts dd a { text-decoration: none; color: var(--tf-accent-text); }
@media (min-width: 60rem) {
  [data-tf-single="editorial-sticky"] .tf-single__frame { grid-template-columns: 14rem minmax(0, 1fr); }
  [data-tf-single="editorial-sticky"] .tf-single__head { grid-column: 1 / -1; max-width: 60rem; }
  [data-tf-single="editorial-sticky"] .tf-single__cover { grid-column: 1 / -1; }
  [data-tf-single="editorial-sticky"] .tf-single__aside { grid-column: 1; grid-row: 3; }
  [data-tf-single="editorial-sticky"] .tf-single__body { grid-column: 2; grid-row: 3; }
}
[data-tf-single="editorial-sticky"] .tf-single__head .tf-h1 { font-size: var(--tf-step-5); }

/* 5. TOC · author · share · prev/next · related · newsletter --------------- */
.tf-toc { font-size: var(--tf-step--1); }
.tf-toc__title { margin-block-end: var(--tf-space-3); }
.tf-toc__list { display: grid; gap: var(--tf-space-1); counter-reset: toc; }
.tf-toc__item a { display: block; padding: 0.3em 0 0.3em var(--tf-space-3); border-inline-start: 2px solid var(--tf-line); text-decoration: none; color: var(--tf-ink-muted); transition: color var(--tf-dur) var(--tf-ease), border-color var(--tf-dur) var(--tf-ease); }
.tf-toc__item a:hover { color: var(--tf-ink); border-color: var(--tf-accent); }
.tf-toc__item--3 a { padding-inline-start: var(--tf-space-5); font-size: 0.95em; }
.tf-toc--details { border: var(--tf-card-border); border-radius: var(--tf-radius); background: var(--tf-surface); padding: var(--tf-space-3) var(--tf-space-4); }
.tf-toc--details summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 2rem; margin: 0; }
.tf-toc--details summary::-webkit-details-marker { display: none; }
.tf-toc--details summary::after { content: "+"; font-family: var(--tf-font-label); color: var(--tf-ink-muted); }
.tf-toc--details[open] summary::after { content: "−"; }
.tf-toc--details[open] summary { margin-block-end: var(--tf-space-3); }
.tf-toc--details .tf-toc__list { columns: 2; column-gap: var(--tf-space-5); display: block; }
.tf-toc--details .tf-toc__item { break-inside: avoid; }
@media (max-width: 40rem) { .tf-toc--details .tf-toc__list { columns: 1; } }

.tf-author { display: grid; grid-template-columns: auto 1fr; gap: var(--tf-space-4); padding: var(--tf-space-5); background: var(--tf-surface); border: var(--tf-card-border); border-radius: var(--tf-card-radius); box-shadow: var(--tf-card-shadow); }
.tf-author__body { display: grid; gap: var(--tf-space-2); min-width: 0; }
.tf-author__name { font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-1); line-height: 1.2; letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); }
.tf-author__role { font-family: var(--tf-font-body); font-weight: 400; font-size: var(--tf-step--1); color: var(--tf-ink-muted); }
.tf-author__bio { color: var(--tf-ink-muted); text-wrap: pretty; }
.tf-author__more { font-weight: 600; text-decoration: none; color: var(--tf-accent-text); }
.tf-author__more:hover { text-decoration: underline; }
@media (max-width: 30rem) { .tf-author { grid-template-columns: 1fr; } }

.tf-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tf-space-3); }
.tf-share__list { display: flex; flex-wrap: wrap; gap: var(--tf-space-2); }
.tf-share__btn { width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; border: 1px solid var(--tf-line); border-radius: var(--tf-btn-radius); background: var(--tf-surface); color: var(--tf-ink); font-family: var(--tf-font-label); font-size: var(--tf-step--1); font-weight: 600; text-decoration: none; transition: background var(--tf-dur) var(--tf-ease), color var(--tf-dur) var(--tf-ease), border-color var(--tf-dur) var(--tf-ease), transform var(--tf-dur) var(--tf-ease); }
.tf-share__btn:hover { background: var(--tf-accent); color: var(--tf-accent-ink); border-color: var(--tf-accent); transform: translateY(-1px); }
.tf-share__btn.is-done { background: var(--tf-accent-2); border-color: var(--tf-accent-2); color: var(--tf-accent-ink); }
.tf-share--vertical { flex-direction: column; align-items: flex-start; }
.tf-share--vertical .tf-share__list { flex-direction: column; }
@media (max-width: 59.99rem) { .tf-share--vertical, .tf-share--vertical .tf-share__list { flex-direction: row; } }

.tf-prevnext { display: grid; grid-template-columns: 1fr; gap: var(--tf-space-4); }
.tf-prevnext__link { display: grid; gap: var(--tf-space-2); padding: var(--tf-space-5); text-decoration: none; border: var(--tf-card-border); border-radius: var(--tf-card-radius); background: var(--tf-surface); box-shadow: var(--tf-card-shadow); transition: border-color var(--tf-dur) var(--tf-ease), transform var(--tf-dur) var(--tf-ease); }
.tf-prevnext__link:hover { border-color: var(--tf-accent); transform: translateY(-2px); }
.tf-prevnext__link--next { text-align: end; justify-items: end; }
.tf-prevnext__title { font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-1); line-height: 1.2; text-wrap: balance; letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); }
@media (min-width: 48rem) { .tf-prevnext { grid-template-columns: 1fr 1fr; } }

.tf-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tf-space-4); margin-block-end: var(--tf-space-5); padding-block-end: var(--tf-space-3); border-bottom: var(--tf-rule); }
.tf-related__title { font-size: var(--tf-step-2); }
.tf-related__grid { grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: var(--tf-space-5); }
@media (min-width: 60rem) { .tf-related__grid { grid-template-columns: repeat(3, 1fr); } }

.tf-newsletter--band { padding-block: var(--tf-section-y); }
.tf-newsletter__inner { display: grid; gap: var(--tf-space-6); align-items: center; }
.tf-newsletter__copy { display: grid; gap: var(--tf-space-3); max-width: 36rem; }
.tf-newsletter__title { font-size: var(--tf-step-3); }
.tf-newsletter__body { color: var(--tf-ink-muted); text-wrap: pretty; }
.tf-newsletter__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--tf-space-2); align-items: start; }
.tf-newsletter__fine { grid-column: 1 / -1; font-size: var(--tf-step--1); color: var(--tf-ink-muted); }
.tf-newsletter--band .tf-newsletter__input { background: color-mix(in oklab, var(--tf-dark-ink) 8%, transparent); border-color: color-mix(in oklab, var(--tf-dark-ink) 30%, transparent); color: var(--tf-dark-ink); }
.tf-newsletter--band .tf-newsletter__input::placeholder { color: var(--tf-dark-muted); }
@media (min-width: 60rem) { .tf-newsletter--band .tf-newsletter__inner { grid-template-columns: 1.1fr 1fr; gap: var(--tf-space-8); } }
.tf-newsletter--card { padding: var(--tf-space-5); background: var(--tf-surface-2); border-radius: var(--tf-card-radius); border: var(--tf-card-border); }
.tf-newsletter--card .tf-newsletter__title { font-size: var(--tf-step-1); }
.tf-newsletter--card .tf-newsletter__body { font-size: var(--tf-step--1); }
.tf-newsletter--card .tf-newsletter__form { grid-template-columns: 1fr; }
.tf-newsletter--card .tf-newsletter__form .tf-btn { width: 100%; }
@media (max-width: 30rem) { .tf-newsletter__form { grid-template-columns: 1fr; } .tf-newsletter__form .tf-btn { width: 100%; } }

/* 6. Search page ----------------------------------------------------------- */
.tf-pagehead--search { max-width: 48rem; }
.tf-search__label { font-weight: 600; font-size: var(--tf-step--1); display: block; margin-block-end: var(--tf-space-2); }
.tf-search__row { display: flex; gap: var(--tf-space-2); }
.tf-search__row .tf-input { flex: 1 1 auto; min-width: 0; font-size: var(--tf-step-1); min-height: 3.25rem; }
.tf-search__hint { font-size: var(--tf-step--1); margin-block-start: var(--tf-space-2); }
.tf-search--compact .tf-search__row .tf-input { font-size: var(--tf-step-0); min-height: 2.75rem; }
.tf-search--compact .tf-btn { padding-inline: 1em; }
.tf-searchpage__form { margin-block-start: var(--tf-space-3); }
.tf-searchpage__samples { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tf-space-2); font-size: var(--tf-step--1); }
.tf-searchpage__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tf-space-7); align-items: start; }
@media (min-width: 60rem) { .tf-searchpage__layout { grid-template-columns: minmax(0, 1fr) 16rem; gap: var(--tf-space-7) var(--tf-space-8); } }
.tf-searchpage__status { display: block; margin-block-end: var(--tf-space-4); padding-block-end: var(--tf-space-3); border-bottom: var(--tf-rule); color: var(--tf-ink-muted); }
.tf-results { display: grid; }
.tf-result { border-bottom: var(--tf-rule); }
.tf-result__link { display: grid; grid-template-columns: 1fr; gap: var(--tf-space-4); padding-block: var(--tf-space-4); text-decoration: none; transition: background var(--tf-dur) var(--tf-ease); }
.tf-result__link:hover .tf-result__title { color: var(--tf-accent-text); }
.tf-result__thumb { width: 100%; aspect-ratio: 3 / 2; }
.tf-result__body { display: grid; gap: var(--tf-space-1); min-width: 0; align-content: start; }
.tf-result__eyebrow { display: flex; flex-wrap: wrap; gap: var(--tf-space-3); align-items: baseline; font-size: var(--tf-step--1); }
.tf-result__title { font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-1); line-height: 1.2; letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); }
.tf-result__excerpt { font-size: var(--tf-step-0); }
@media (min-width: 40rem) { .tf-result__link { grid-template-columns: 10rem minmax(0, 1fr); } .tf-result__thumb { width: 10rem; } }
.tf-searchpage__empty { display: grid; gap: var(--tf-space-3); padding: var(--tf-space-6); border: 1px dashed var(--tf-line); border-radius: var(--tf-card-radius); background: var(--tf-surface); margin-block-start: var(--tf-space-4); }
.tf-searchpage__empty .tf-cluster { display: flex; flex-wrap: wrap; gap: var(--tf-space-2); }
.tf-searchpage__empty-title { font-family: var(--tf-font-display); font-weight: var(--tf-display-weight); font-size: var(--tf-step-1); letter-spacing: var(--tf-display-tracking); text-transform: var(--tf-display-case); }

/* motion safety */
@media (prefers-reduced-motion: reduce) {
  .tf-post .tf-card__media img, .tf-ruled__thumb img, .tf-index__peek, .tf-share__btn, .tf-prevnext__link, .tf-single__brief-next, .tf-single__brief-arrow { transition: none !important; transform: none !important; }
  .tf-index__row:hover .tf-index__peek { transform: translateY(-50%) !important; }
}
