/*
Theme Name: TechiesJournal
Theme URI: https://www.techiesjournal.com/
Author: TechiesJournal
Description: Purpose-built block theme for the TechiesJournal technical publication: books, chapters, articles, topics and the technical archive. Typography-led, one accent, no widgets.
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techiesjournal
*/

/* ---------- Base ---------- */
:root { --tj-hairline: var(--wp--preset--color--hairline); --tj-rule: var(--wp--preset--color--rule); --tj-surface: var(--wp--preset--color--surface); --tj-accent: var(--wp--preset--color--accent); --tj-muted: var(--wp--preset--color--muted); --tj-ink2: var(--wp--preset--color--ink-2); --tj-sans: var(--wp--preset--font-family--apparatus); --tj-mono: var(--wp--preset--font-family--code); --tj-radius: var(--wp--custom--radius); }
html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: anywhere; }
h1, h2, h3, h4 { text-wrap: balance; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--tj-accent); outline-offset: 2px; }
img { height: auto; max-width: 100%; }
figure { margin: 0; }
figcaption, .wp-element-caption { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); line-height: 1.45; margin-top: 0.5rem; text-align: left; }
.wp-block-image img { border: 1px solid var(--tj-hairline); }
pre, code, kbd, samp { font-family: var(--tj-mono); }
.wp-block-code, pre { overflow-x: auto; tab-size: 2; }
p code, li code, td code { font-size: 0.875em; background: var(--tj-surface); padding: 0.1em 0.35em; border-radius: var(--tj-radius); }
.wp-block-table { overflow-x: auto; }
.wp-block-table table, .tablepress { border-collapse: collapse; width: 100%; font-family: var(--tj-sans); font-size: 0.9375rem; }
.wp-block-table th, .wp-block-table td, .tablepress th, .tablepress td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--tj-hairline); }
.wp-block-table th, .tablepress thead th { border-bottom: 2px solid var(--tj-rule); font-weight: 600; }
.wp-block-table tbody tr:nth-child(even) td, .tablepress tbody tr:nth-child(even) td { background: var(--tj-surface); }
.wp-block-quote { font-style: italic; }
.wp-block-quote cite { font-family: var(--tj-sans); font-style: normal; font-size: 0.875rem; color: var(--tj-muted); }
hr, .wp-block-separator { border: 0; border-top: 1px solid var(--tj-hairline); margin: 2rem 0; }
.wp-block-embed { max-width: 100%; }
.wp-block-embed iframe { max-width: 100%; }
sup { line-height: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--wp--preset--color--page); padding: 0.5rem 0.75rem; z-index: 100; font-family: var(--tj-sans); }
.skip-link:focus { top: 0.5rem; }

/* ---------- Apparatus type ---------- */
.tj-label, .tj-meta, .wp-block-post-date, .wp-block-post-terms, .wp-block-query-pagination, .wp-block-post-author-name, .tj-eyebrow { font-family: var(--tj-sans); font-size: 0.875rem; line-height: 1.45; color: var(--tj-muted); }
.tj-label { display: block; text-transform: var(--wp--custom--label-transform); letter-spacing: var(--wp--custom--label-tracking); font-weight: 600; margin-bottom: 0.4rem; }
.tj-meta a, .wp-block-post-terms a { color: inherit; text-decoration: none; }
.tj-meta a:hover, .wp-block-post-terms a:hover { text-decoration: underline; }
.tj-muted { color: var(--tj-muted); }
.tj-standfirst { font-size: 1.25rem; line-height: 1.45; color: var(--tj-ink2); }
.tj-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--tj-rule); padding-bottom: 0.5rem; margin-bottom: 0.25rem; }
.tj-section-title h2 { font-size: 1.25rem; margin: 0; }
.tj-section-title a { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-ink2); white-space: nowrap; }

/* ---------- Buttons ---------- */
.tj-button, .wp-block-button__link { display: inline-block; font-family: var(--tj-sans); font-size: 0.9375rem; font-weight: 500; line-height: 1.2; padding: 0.55rem 1.1rem; border: 1px solid var(--tj-rule); border-radius: 999px; color: var(--tj-ink2); text-decoration: none; background: transparent; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
.tj-button--primary { border-color: var(--tj-accent); color: var(--tj-accent); }
.tj-button:hover, .tj-button--primary:hover { background: var(--tj-accent); border-color: var(--tj-accent); color: var(--wp--preset--color--page); }
.tj-button + .tj-button { margin-left: 0.75rem; }

/* ---------- Header / navigation ---------- */
/* Brand: the production logo alone (raster, shown at half its pixel size for sharpness), no companion text (owner amendment, docs/21). */
.wp-block-site-logo img { display: block; height: auto; }
.tj-header { border-bottom: 1px solid var(--tj-hairline); }
.tj-header .wp-block-group { align-items: center; }
.wp-block-navigation .wp-block-navigation-item__content { padding: 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.wp-block-navigation .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--tj-accent); text-underline-offset: 6px; }
.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close { font-family: var(--tj-sans); font-size: 0.9375rem; gap: 0.4rem; min-height: 44px; padding: 0.5rem 0.25rem; }
.wp-block-navigation__responsive-container-open::after { content: "Menu"; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--page); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.125rem; min-height: 48px; }
.wp-block-search__button { border: 1px solid var(--tj-rule); background: transparent; border-radius: 999px; font-family: var(--tj-sans); padding: 0.4rem 0.9rem; color: var(--tj-ink2); }
.wp-block-search__input { border: 1px solid var(--tj-rule); border-radius: 3px; padding: 0.5rem 0.75rem; font-family: var(--tj-sans); background: var(--wp--preset--color--page); color: inherit; }

/* ---------- Breadcrumb ---------- */
.tj-breadcrumb { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); margin: 1.5rem 0 -1.25rem; }
.tj-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0; margin: 0; padding: 0; }
.tj-breadcrumb li { display: inline; }
.tj-breadcrumb li:not(:last-child)::after { content: "\203A"; margin: 0 0.5rem; color: var(--tj-rule); }
.tj-breadcrumb a { color: var(--tj-ink2); text-decoration: none; }
.tj-breadcrumb a:hover { text-decoration: underline; }
.tj-breadcrumb [aria-current] { color: var(--tj-muted); }

/* ---------- Rows (indexes) ---------- */
.tj-rows .wp-block-post, .tj-row, .tj-book-row, .tj-topic-row { border-bottom: 1px solid var(--tj-hairline); padding: 1rem 0; margin: 0; }
.tj-rows .wp-block-post:last-child { border-bottom: 0; }
.tj-rows .wp-block-post-title { font-size: 1.25rem; font-weight: 400; line-height: 1.3; margin: 0 0 0.25rem; }
.tj-rows .wp-block-post-title a { color: inherit; text-decoration: none; }
.tj-rows .wp-block-post-title a:hover { text-decoration: underline; }
.tj-rows .wp-block-post-excerpt { margin: 0.25rem 0 0.4rem; }
.tj-rows .wp-block-post-excerpt__more-text { display: none; }
.tj-rows .tj-meta { margin: 0; }
.tj-year-heading { font-family: var(--tj-sans); font-size: 0.875rem; font-weight: 600; letter-spacing: var(--wp--custom--label-tracking); text-transform: var(--wp--custom--label-transform); color: var(--tj-muted); margin: 2rem 0 0; padding-bottom: 0.4rem; border-bottom: 1px solid var(--tj-rule); }
.wp-block-query-pagination { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--tj-hairline); }
.wp-block-query-pagination a { color: var(--tj-ink2); }

/* ---------- Home ---------- */
/* Approved composition (docs/21): one 75rem/1200px container, 12-column grid, reduced rules,
   compressed vertical rhythm; opening = statement (cols 1-7) + featured book (cols 8-12). */
.tj-home-opening { padding-top: 3rem; }
.tj-home-statement h1 { font-size: 2.25rem; line-height: 1.16; max-width: 15em; margin: 0 0 1.5rem; }
.tj-home-statement p { max-width: 40ch; margin: 0; }
.tj-home-section { margin-top: 4rem; }
.tj-home-section .tj-section-title { border-bottom: 0; padding-bottom: 0; margin-bottom: 1.25rem; }
.tj-home-section .tj-section-title a, .tj-author-block__link a { color: var(--tj-accent); font-weight: 600; text-decoration: none; }
.tj-home-section .tj-section-title a:hover, .tj-author-block__link a:hover { text-decoration: underline; }
/* Start here: unruled curated rows, stronger titles */
.tj-start-here .tj-row { border-bottom: 0; padding: 0; margin-top: 1.375rem; }
.tj-start-here .tj-row:first-child { margin-top: 0.125rem; }
.tj-start-here .wp-block-post-title { font-size: 1.25rem; font-weight: 600; }
/* Topics index: rules between rows only, none after the last */
.tj-discovery .tj-topic-row { border-bottom: 0; border-top: 1px solid var(--tj-hairline); padding: 0.75rem 0; }
.tj-discovery .tj-topic-row:first-child { border-top: 0; padding-top: 0.125rem; }
/* Recent writing: title + compact meta left, date right-aligned */
.tj-rows--dated .wp-block-post { display: grid; grid-template-columns: 1fr auto; column-gap: 2rem; align-items: start; }
.tj-rows--dated .wp-block-post-title { grid-column: 1; font-size: 1.125rem; font-weight: 600; margin: 0 0 0.375rem; }
.tj-rows--dated .tj-post-meta-line { grid-column: 1; }
.tj-rows--dated .tj-row-date { grid-column: 2; grid-row: 1 / span 2; font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); text-align: right; padding-top: 0.3rem; margin: 0; }
/* Discovery band: one strong rule, topics (4 cols) + start here (7 cols, one column of air between) */
.tj-discovery { border-top: 1px solid var(--tj-rule); padding-top: 2rem; }
.tj-discovery .tj-section-title { margin-bottom: 1rem; }
.tj-home-archive { border-top: 1px solid var(--tj-hairline); padding-top: 2rem; margin-top: 3.5rem; }
.tj-home-archive .tj-section-title { margin-bottom: 0.625rem; }
.tj-home-archive .tj-section-title h2 { font-size: 1.125rem; color: var(--tj-ink2); }
.tj-home-archive__intro { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); max-width: 68ch; margin: 0 0 0.875rem; }
.tj-archive-sample .tj-archive-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; margin: 0; padding: 0.45rem 0; font-size: 1rem; line-height: 1.45; }
.tj-archive-sample .tj-archive-row a { color: var(--tj-ink2); text-decoration: none; }
.tj-archive-sample .tj-archive-row a:hover { text-decoration: underline; }
.tj-archive-sample .tj-archive-row__year { flex: none; }
/* About: compact text-only editorial block */
.tj-home-about { border-top: 1px solid var(--tj-hairline); padding-top: 2rem; margin-top: 3rem; }
/* The photograph floats inside the bio so the text wraps around it (owner request). */
.tj-author-block__photo { float: left; width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--tj-hairline); border-radius: var(--tj-radius); margin: 0.25rem 1.25rem 0.375rem 0; }
.tj-author-block__link { clear: left; }
@media (max-width: 600px) { .tj-author-block__photo { width: 72px; height: 72px; margin-right: 1rem; } }
.tj-author-block h2 { font-size: 1.25rem; margin: 0 0 0.875rem; }
.tj-author-block p { font-size: 1.125rem; line-height: 1.6; color: var(--tj-ink2); max-width: 68ch; margin: 0 0 0.875rem; }
.tj-author-block__link { font-family: var(--tj-sans); font-size: 0.875rem; font-weight: 600; }
@media (min-width: 900px) {
  .tj-home-opening { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2rem; }
  .tj-home-opening__statement { grid-column: 1 / span 7; padding-right: 1rem; margin-block-start: 0; }
  .tj-home-opening__book { grid-column: 8 / span 5; padding-top: 0.625rem; margin-block-start: 0; }
  .tj-home-statement h1 { font-size: 2.75rem; }
  .tj-discovery { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2rem; }
  .tj-discovery__topics { grid-column: 1 / span 4; margin-block-start: 0; }
  .tj-discovery__start { grid-column: 6 / span 7; margin-block-start: 0; }
}
@media (max-width: 899px) {
  .tj-home-opening__book { margin-top: 2.5rem; }
  .tj-discovery__start { margin-top: 2.5rem; }
}
@media (max-width: 600px) {
  .tj-home-opening { padding-top: 1.75rem; }
  .tj-home-statement h1 { font-size: 1.625rem; margin-bottom: 0.875rem; }
  .tj-home-section { margin-top: 2.5rem; }
  .tj-home-archive, .tj-home-about { margin-top: 2.25rem; padding-top: 1.375rem; }
  .tj-rows--dated .wp-block-post { grid-template-columns: 1fr; }
  .tj-rows--dated .tj-row-date { grid-column: 1; grid-row: auto; text-align: left; padding-top: 0; margin-top: 0.25rem; }
}
/* Old two-column helper kept for non-home templates */
.tj-two-col { display: grid; grid-template-columns: 1fr; gap: 2rem 3rem; }
@media (min-width: 900px) { .tj-two-col { grid-template-columns: 1fr 1fr; } }
/* Legacy author-line (non-home contexts) */
.tj-author-line { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: start; border-top: 1px solid var(--tj-rule); padding-top: 1.5rem; margin-top: 3rem; }
.tj-author-line img, .tj-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tj-hairline); }
.tj-author-line p { margin: 0; font-size: 1rem; line-height: 1.5; }

/* ---------- Books ---------- */
.tj-featured-book__cover, .tj-book-row__cover, .tj-book-cover a { text-decoration: none; color: inherit; display: inline-block; }
.tj-cover { display: flex; flex-direction: column; justify-content: space-between; width: 150px; aspect-ratio: 2 / 3; border: 1px solid var(--tj-rule); border-top: 4px solid var(--tj-accent); background: var(--tj-surface); padding: 0.9rem 0.8rem; font-family: var(--tj-sans); border-radius: var(--tj-radius); box-sizing: border-box; }
.tj-cover__title { font-family: var(--wp--preset--font-family--reading); font-weight: 600; font-size: 1rem; line-height: 1.2; display: block; }
.tj-cover__sub { font-size: 0.7rem; line-height: 1.3; color: var(--tj-ink2); display: block; margin-top: 0.4rem; }
.tj-cover__author { font-size: 0.7rem; color: var(--tj-muted); display: block; }
.tj-cover__img { width: 150px; border: 1px solid var(--tj-hairline); border-radius: var(--tj-radius); }
.tj-book-row { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; padding: 1.5rem 0; }
@media (max-width: 600px) { .tj-book-row { grid-template-columns: 1fr; } }
.tj-book-row__title { font-size: 1.5rem; margin: 0 0 0.15rem; font-weight: 600; }
.tj-book-row__title a { color: inherit; text-decoration: none; }
.tj-book-row__subtitle { margin: 0 0 0.4rem; color: var(--tj-ink2); }
.tj-book-row__desc { margin: 0.5rem 0 0.9rem; font-size: 1rem; line-height: 1.5; }
.tj-book-row__actions, .tj-book-details__actions { margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tj-book-row__actions .tj-button + .tj-button, .tj-book-details__actions .tj-button + .tj-button { margin-left: 0; }
.tj-featured-book { padding-top: 0; }
.tj-featured-book .tj-featured-book__cover { float: left; width: 172px; margin: 0.3rem 1.625rem 0.875rem 0; }
.tj-featured-book .tj-cover, .tj-featured-book .tj-cover__img { width: 172px; }
.tj-featured-book__title { font-size: 1.625rem; line-height: 1.2; margin: 0 0 0.25rem; font-weight: 600; }
.tj-featured-book__title a { color: inherit; text-decoration: none; }
.tj-featured-book__subtitle { font-size: 1.125rem; font-style: italic; color: var(--tj-ink2); margin: 0 0 0.625rem; }
.tj-featured-book__status { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); margin: 0 0 0.75rem; }
.tj-featured-book__desc { font-size: 1rem; line-height: 1.6; color: var(--tj-ink2); margin: 0 0 1.25rem; }
.tj-featured-book .tj-book-row__actions { clear: left; }
@media (max-width: 600px) {
  /* Mobile: cover beside the title block only; the description never wraps around the cover. */
  .tj-featured-book { display: grid; grid-template-columns: 118px 1fr; column-gap: 1.125rem; }
  .tj-featured-book .tj-featured-book__cover { float: none; width: 118px; margin: 0; grid-column: 1; }
  .tj-featured-book .tj-cover, .tj-featured-book .tj-cover__img { width: 118px; }
  .tj-featured-book .tj-cover { padding: 0.75rem 0.75rem 0.625rem; }
  .tj-featured-book .tj-cover__title { font-size: 0.9375rem; }
  .tj-featured-book__head { grid-column: 2; }
  .tj-featured-book__title { font-size: 1.25rem; line-height: 1.25; }
  .tj-featured-book__subtitle { font-size: 1rem; margin-bottom: 0.5rem; }
  .tj-featured-book__desc, .tj-featured-book .tj-book-row__actions { grid-column: 1 / -1; }
  .tj-featured-book__desc { margin-top: 0.75rem; }
}

/* ---------- Chapter reader ---------- */
.tj-reader-bar { position: sticky; top: 0; z-index: 20; background: var(--wp--preset--color--page); border-bottom: 1px solid var(--tj-hairline); font-family: var(--tj-sans); font-size: 0.9375rem; min-height: 56px; }
.tj-reader-bar .wp-block-group { align-items: center; min-height: 56px; }
.tj-reader-bar a { color: var(--tj-ink2); text-decoration: none; padding: 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.tj-reader-bar a:hover { text-decoration: underline; }
.tj-reader-bar__title { color: var(--tj-muted); }
@media (max-width: 600px) { .tj-reader-bar__title { display: none; } }
.tj-reader { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1100px) { .tj-reader { grid-template-columns: 16rem minmax(0, 42rem); gap: 3rem; } .tj-reader__toc { position: sticky; top: 4.5rem; align-self: start; max-height: calc(100vh - 5rem); overflow-y: auto; font-size: 0.9375rem; } }
.tj-reader__toc { display: none; }
@media (min-width: 1100px) { .tj-reader__toc { display: block; } }
.tj-reader__toc .tj-book-toc li { font-size: 0.9375rem; }
.tj-chapter-context { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); margin-bottom: 0.5rem; }
.tj-chapter-context a { color: inherit; }
.tj-chapter-number { display: block; font-family: var(--tj-sans); font-size: 0.875rem; font-weight: 600; letter-spacing: var(--wp--custom--label-tracking); text-transform: var(--wp--custom--label-transform); color: var(--tj-muted); margin-bottom: 0.25rem; }
.tj-chapter-contents { border: 1px solid var(--tj-hairline); border-radius: var(--tj-radius); padding: 0.9rem 1rem; margin: 1.5rem 0 2rem; font-family: var(--tj-sans); font-size: 0.9375rem; }
.tj-chapter-contents ol { margin: 0; padding-left: 1.2rem; }
.tj-chapter-contents li { margin: 0.2rem 0; }
.tj-chapter-contents a { color: var(--tj-ink2); text-decoration: none; }
.tj-chapter-contents a:hover { text-decoration: underline; }
.tj-chapter-nav { margin-top: 3rem; border-top: 1px solid var(--tj-rule); padding-top: 1.5rem; }
.tj-chapter-nav__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .tj-chapter-nav__pair { grid-template-columns: 1fr; } }
.tj-chapter-nav__card { display: block; border: 1px solid var(--tj-hairline); border-radius: var(--tj-radius); padding: 0.9rem 1rem; text-decoration: none; color: inherit; min-height: 44px; }
.tj-chapter-nav__card:hover { border-color: var(--tj-accent); }
.tj-chapter-nav__card.is-empty { border: 0; }
.tj-chapter-nav__next { text-align: right; }
.tj-chapter-nav__title { display: block; font-size: 1.0625rem; line-height: 1.35; }
.tj-chapter-nav__home { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); margin-top: 1rem; }
.tj-chapter-nav__home a { color: inherit; }
/* Mobile contents panel */
.tj-toc-toggle { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--tj-sans); font-size: 0.9375rem; background: none; border: 1px solid var(--tj-rule); border-radius: 999px; padding: 0.4rem 0.9rem; color: var(--tj-ink2); cursor: pointer; }
@media (min-width: 1100px) { .tj-toc-toggle { display: none; } }
.tj-toc-panel { position: fixed; inset: 0 0 0 auto; width: min(22rem, 100%); background: var(--wp--preset--color--page); border-left: 1px solid var(--tj-hairline); z-index: 50; padding: 1rem 1.25rem; overflow-y: auto; transform: translateX(100%); transition: transform 0.2s ease; }
.tj-toc-panel[data-open="true"] { transform: none; }
.tj-toc-panel__close { float: right; }
@media (prefers-reduced-motion: reduce) { .tj-toc-panel { transition: none; } }
.tj-toc-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 40; }
.tj-toc-backdrop[hidden] { display: none; }

/* ---------- Callouts / notes ---------- */
.tj-callout, .wp-block-group.is-style-tj-note, .wp-block-group.is-style-tj-warning, .wp-block-group.is-style-tj-tip { background: var(--tj-surface); border-left: 3px solid var(--tj-rule); padding: 0.9rem 1.1rem; border-radius: 0 var(--tj-radius) var(--tj-radius) 0; margin: 1.5rem 0; font-size: 1rem; }
.tj-callout--note, .wp-block-group.is-style-tj-note { border-left-color: var(--tj-accent); }
.wp-block-group.is-style-tj-warning { border-left-color: var(--wp--preset--color--warning); }
.tj-callout p, .wp-block-group.is-style-tj-note p:last-child, .wp-block-group.is-style-tj-warning p:last-child, .wp-block-group.is-style-tj-tip p:last-child { margin-bottom: 0; }
.tj-callout .tj-label { display: inline; margin-right: 0.35rem; }
.tj-archive-notice { margin: 0 0 1.5rem; }

/* ---------- Article ---------- */
.tj-article-header { margin-bottom: 2rem; }
.tj-article-header .wp-block-post-title { margin: 0.25rem 0 0.75rem; }
.tj-article-header .tj-meta { margin: 0; }
.tj-article-footer { margin-top: 3rem; border-top: 1px solid var(--tj-rule); padding-top: 1.5rem; }
.tj-related .tj-section-title h2 { font-size: 1.125rem; }
.wp-block-post-featured-image img { border: 1px solid var(--tj-hairline); }

/* ---------- Topics ---------- */
.tj-topics-list ul { list-style: none; padding: 0; margin: 0; }
.tj-topic-row { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1.5rem; align-items: baseline; }
.tj-topic-row__name { font-size: 1.25rem; color: inherit; text-decoration: none; }
.tj-topic-row__name:hover { text-decoration: underline; }
.tj-topic-row__desc { grid-column: 1; font-size: 1rem; color: var(--tj-ink2); line-height: 1.5; }
.tj-topic-row__count { grid-column: 2; grid-row: 1; white-space: nowrap; }

/* ---------- Archive ---------- */
.tj-archive-area { margin-top: 2rem; }
.tj-archive-area summary { cursor: pointer; font-size: 1.25rem; padding: 0.75rem 0; border-bottom: 1px solid var(--tj-rule); list-style: none; display: flex; justify-content: space-between; min-height: 44px; align-items: center; }
.tj-archive-area summary::-webkit-details-marker { display: none; }
.tj-archive-area summary .tj-meta { font-weight: 400; }
.tj-archive-area ul { list-style: none; padding: 0; margin: 0; }
.tj-archive-area li { padding: 0.7rem 0; border-bottom: 1px solid var(--tj-hairline); }
.tj-archive-area li a { color: inherit; text-decoration: none; font-size: 1.0625rem; }
.tj-archive-area li a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.tj-footer { border-top: 1px solid var(--tj-rule); margin-top: 3.5rem; padding: 2rem 0 2.75rem; font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); }
.tj-footer .wp-block-navigation .wp-block-navigation-item__content { color: var(--tj-ink2); }
.tj-footer p { margin: 0.25rem 0; }

/* ---------- Share and corrections ---------- */
.tj-share { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); margin-top: 2rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.tj-share .tj-label { margin: 0; }
.tj-share a { color: var(--tj-ink2); text-decoration: none; }
.tj-share a:hover { text-decoration: underline; }
.tj-share button { font: inherit; color: var(--tj-ink2); background: none; border: 0; padding: 0; cursor: pointer; }
.tj-share button:hover { text-decoration: underline; }
.tj-correction-wrap { margin-top: 1rem; }
.tj-correction summary { font-family: var(--tj-sans); font-size: 0.875rem; color: var(--tj-muted); cursor: pointer; }
.tj-correction summary:hover { color: var(--tj-ink2); }
.tj-correction__form { border: 1px solid var(--tj-hairline); border-radius: var(--tj-radius); padding: 1rem 1.25rem; margin-top: 0.75rem; max-width: 34rem; font-family: var(--tj-sans); font-size: 0.9375rem; }
.tj-correction__form label { color: var(--tj-ink2); }
.tj-correction__form input[type="text"], .tj-correction__form input[type="email"], .tj-correction__form textarea { width: 100%; border: 1px solid var(--tj-rule); border-radius: var(--tj-radius); padding: 0.4rem 0.6rem; font: inherit; background: var(--wp--preset--color--page); color: inherit; box-sizing: border-box; }
.tj-correction__hp { position: absolute; left: -9999px; }
.tj-chapter-foot, .tj-article-foot { margin-top: 0; }

/* ---------- Learning path ---------- */
.tj-learning-path { border-top: 1px solid var(--tj-hairline); margin-top: 2rem; padding-top: 1rem; font-family: var(--tj-sans); font-size: 0.9375rem; display: grid; gap: 0.5rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tj-learning-path { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.tj-learning-path p { margin: 0; }
.tj-learning-path .tj-label { margin-bottom: 0.15rem; }
.tj-learning-path a { color: var(--tj-ink); }

/* ---------- Legacy (classic-editor) content normalisation ---------- */
/* Old posts carry inline alignment, colour and font styles from the 2017 editor; the reading column wins. */
.tj-legacy-post .entry-content p, .tj-legacy-post .wp-block-post-content p, .wp-block-post-content p[style*="justify"] { text-align: left !important; }
.wp-block-post-content [style*="color:"], .wp-block-post-content font[color] { color: inherit !important; }
.wp-block-post-content [style*="font-family"], .wp-block-post-content [style*="font-size"] { font-family: inherit !important; font-size: inherit !important; }
.wp-block-post-content p > strong:only-child { display: inline-block; margin-top: 0.75rem; }
.tablepress { table-layout: auto; }
.tablepress th { white-space: normal; min-width: 7rem; }
.wp-block-post-content iframe[src*="youtube"] { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

/* ---------- Print ---------- */
@media print {
  .tj-header, .tj-footer, .tj-reader-bar, .tj-reader__toc, .tj-toc-panel, .tj-toc-backdrop, .tj-toc-toggle, .tj-chapter-nav, .skip-link, .wp-block-navigation, .wp-block-search { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main, .tj-reader, article { display: block; max-width: none; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]:not([href*="techiesjournal"])::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; }
  h1, h2, h3 { page-break-after: avoid; }
  figure, table, pre { page-break-inside: avoid; }
}
