/*
Theme Name: NerdyTips
Theme URI: https://tennispredictions.ai/blog
Author: KickOff Ventures LLC
Author URI: https://tennispredictions.ai
Description: Custom WordPress theme for the TennisPredictions AI blog.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nerdytips
Tags: blog, sports, custom-menu, custom-logo, featured-images
*/

/* ==========================================================================
   Blog layer for the main site's design system.

   This file is ONLY the blog: post cards, article typography, sidebar,
   comments, pagination, search. Everything structural — reset, tokens, fonts,
   header, drawer, footer, tab bar, buttons — comes from the main site's bundle,
   which is enqueued ahead of this file (see nerdytips_scripts()).

   It replaced ~1900 lines that WERE the old design: a second CSS reset, a
   Bootstrap-era grid, and colours hardcoded in hex. Keeping any of it would
   have meant two resets fighting each other and two sources of truth for
   colour. Every value below is a token from the bundle, so a palette change on
   the main site lands here too.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Grid shim

   The templates still carry Bootstrap class names (container / row / col-*).
   Rather than rewrite ten template files — and risk breaking markup in parts
   this change never touches — these rules reimplement exactly the subset the
   blog uses, in ~40 lines instead of Bootstrap's ~190KB. Scoped under .nt-blog
   (the body class) so none of it can leak into the shared header or footer.
   -------------------------------------------------------------------------- */
.nt-blog .container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
/* section-new.php / section-popular.php open their own .container INSIDE the
   post column, which re-applied the page gutter on top of the outer one. Measured
   on a 390px screen: post cards at x=20, the Popular Articles heading at x=32 and
   its cards at x=24 — three different left edges on one page.
   The padding is NOT simply zeroed: these sections put a .row directly inside,
   and a row's negative margin needs something to cancel it or the content lands
   OUTSIDE the page grid instead (tried it — heading went to x=12, cards to x=4).
   Matching the row's own margin puts everything back exactly on 20. */
.nt-blog .container .container { max-width: none; padding-left: 12px; padding-right: 12px; }
@media (max-width: 575.98px) {
  .nt-blog .container .container { padding-left: 8px; padding-right: 8px; }
}

.nt-blog .row { display: flex; flex-wrap: wrap; margin-left: -12px; margin-right: -12px; }
.nt-blog [class*="col-"] { position: relative; width: 100%; padding-left: 12px; padding-right: 12px; }
.nt-blog .col-md-12, .nt-blog .col-lg-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 768px) {
  .nt-blog .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .nt-blog .col-md-6 { flex: 0 0 50%;      max-width: 50%; }
  .nt-blog .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
}
@media (min-width: 992px) {
  .nt-blog .col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .nt-blog .col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .nt-blog .flex-lg-row { flex-direction: row; }
}
/* Stacking is a SMALL-SCREEN concern only, so it lives in a max-width query.
   Written flat it sat after the min-width:992px block at equal specificity, won
   on source order, and forced the row to stay a column at every width — the
   sidebar dropped below the posts on desktop instead of sitting beside them.
   And it is NOT column-reverse despite the class name index.php carries: the DOM
   order is posts then sidebar, so reversing put 1507px of search + 20 categories
   + recent posts above the first article (measured live). The old theme got away
   with that because it kept the sidebar collapsed behind the .active-nt-sidebar
   toggle; this design uses the header drawer instead. */
@media (max-width: 991.98px) {
  .nt-blog .flex-column-reverse { flex-direction: column; }
}
.nt-blog .align-items-center { align-items: center; }
.nt-blog .justify-content-end { justify-content: flex-end; }
.nt-blog .h-100 { height: 100%; }
.nt-blog .m-0 { margin: 0 !important; }
.nt-blog .mt-3 { margin-top: 16px; }
.nt-blog .mb-3 { margin-bottom: 16px; }
.nt-blog .text-right { text-align: right; }
.nt-blog .fst-italic { font-style: italic; }
.nt-blog .text-muted { color: var(--text-dim); }
.nt-blog .img-fluid,
.nt-blog .img-blog-fluid { max-width: 100%; height: auto; }
.nt-blog .rounded { border-radius: var(--r-md); }
.nt-blog .mb-blog-1 { margin-bottom: 4px; }
.nt-blog .mb-blog-2 { margin-bottom: 8px; }
.nt-blog .mb-blog-4 { margin-bottom: 20px; }
.nt-blog .mb-blog-5 { margin-bottom: 28px; }
.nt-blog .mb-4 { margin-bottom: 20px; }
.nt-blog .mb-5 { margin-bottom: 28px; }
.nt-blog .mt-5 { margin-top: 28px; }
.nt-blog .ml-0 { margin-left: 0 !important; }
.nt-blog .py-2 { padding-top: 8px; padding-bottom: 8px; }
.nt-blog .py-5 { padding-top: 40px; padding-bottom: 40px; }
.nt-blog .d-flex { display: flex; }
.nt-blog .text-center { text-align: center; }
.nt-blog .justify-content-center { justify-content: center; }
.nt-blog .fw-bolder { font-weight: 700; }
/* 404.php asks for a Bootstrap contextual border; in this palette it is just
   the standard card edge. */
.nt-blog .border-primary { border: 1px solid var(--border); border-radius: var(--r-card); }
.nt-blog figure-blog { display: block; margin: 0 0 20px; }

/* Nested rows are expensive on a phone. index.php wraps cards in .nt-card-bg
   (itself a .row) and content-new.php nests another .row inside each card, so the
   paddings stack: 20 container + 10 card + 12 col + 12 inner col. Measured on a
   390px screen that left the image only 302px wide — 77% of the viewport, with
   44px of dead margin on the left. Trimming the inner spacing gives the content
   back ~40px without touching the desktop rhythm. */
@media (max-width: 575.98px) {
  .nt-blog .row { margin-left: -8px; margin-right: -8px; }
  .nt-blog [class*="col-"] { padding-left: 8px; padding-right: 8px; }
  .nt-card-bg { padding: 6px; }
  .nt-blog-content { padding: 14px; }
  /* Article body was the worst case of the stacking above: container 20 + two
     nested col paddings + 24px card padding left the text 276px wide on a 390px
     phone — barely 35 characters a line, with a third of the screen empty. The
     card supplies its own padding, so the column around it does not need any. */
  .nt-blog-single.col-md-12 { padding-left: 0; padding-right: 0; }
  .nt-blog-single > .card-blog-body { padding: 18px 14px; }
}

/* content.php splits the article's meta into col-md-8 (chips) + col-md-4 (date)
   and marks the date .text-right — which reads as a deliberate two-end row on
   desktop. Once those columns stack on a phone the two sit on separate lines with
   opposite alignments, so the block looks lopsided. Left-align it there.
   .nt-blog in front outranks the shim's own `.nt-blog .text-right`. */
@media (max-width: 767.98px) {
  .nt-blog .nt-blog-single .nt-block-date { text-align: left; }
}

/* --- Feed rows on phones: slimmer and denser ------------------------------
   At 390px a card measured 349px tall — barely two per screen. The height went
   into a 16/10 image, a 20px serif headline over two lines, and then the date
   and the category chips each claiming their own full-width row.
   The markup order is title → date → chips, so header becomes a wrapping flex
   row: the title takes a full basis, and the last two share the line under it.
   No markup change needed. */
@media (max-width: 767.98px) {
  .nt-post-featured .nt-blog-content { padding: 12px; }

  .nt-post-featured .nt-blog-title h2 {
    font-size: 17px;
    line-height: 1.25;
    margin: 0;
    /* two lines max — a long headline used to push the card another 25px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .nt-post-featured header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
  }
  .nt-post-featured header > .nt-blog-title { flex: 0 0 100%; }
  .nt-post-featured header > .nt-block-date { flex: 0 0 auto; }
  .nt-post-featured header > .nt-blog-categories { flex: 1 1 auto; margin-bottom: 0; }

  /* Drop the "Posted on " prefix so the date and the chips share one line.
     The prefix is a bare text node next to <time>, with no element to target —
     zeroing the parent's font-size collapses it and <time> restates its own.
     "Posted on July 20, 2026" is ~140px; the date alone is ~75px, which is what
     makes the two fit side by side at 390px. The single post keeps the prefix. */
  .nt-post-featured .nt-block-date,
  .nt-post-featured .nt-block-date div { font-size: 0; }
  .nt-post-featured .nt-block-date time { font-size: 11.5px; color: var(--text-dim); }

  /* inline-block + line-height instead of inline-flex, because text-overflow
     needs a block formatting context to ellipsis in. Today's longest category
     ("Indian Wells, USA, Qualifying") is 203px against ~294px of room, so this
     changes nothing now — it is the guard for the next longer one. */
  /* font-size stays at the base 10.5px — dropping it to 10 bought 2px of card
     height and cost legibility on the one label people actually scan by. */
  .nt-post-featured .nt-blog-categories a,
  .nt-post-featured .badge-blog {
    display: inline-block;
    height: 22px;
    line-height: 20px;
    padding: 0 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nt-post-featured header > .nt-blog-categories { min-width: 0; }
}

/* --------------------------------------------------------------------------
   2. Page shell
   -------------------------------------------------------------------------- */
.nt-content {
  display: block;
  /* Symmetric. It was 28 top / 48 bottom, and .nt-footer__inner already opens
     with 80px of its own — so the gap above the footer measured 128px against
     28px under the header. The footer's 80 is the shared component's business;
     this layer just stops adding to it. */
  padding: 32px 0;
}
/* The tab bar is server-rendered only for mobile user agents, so keying the
   clearance off the viewport left 96px of dead space above the footer on every
   desktop view (measured: padding-bottom 96px with no .nt-tabbar in the DOM).
   Tie it to the bar actually being present instead. */
.nt-blog:has([data-bottombar]) .nt-content {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* --------------------------------------------------------------------------
   3. Post cards (index / archive / search)
   -------------------------------------------------------------------------- */
.nt-card-bg {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 10px;
}
/* The panel's own padding sets the inset; the last card's margin was adding to
   it, so the gap read 11px above the first card and 27px below the last (7 vs 23
   on mobile). Cards space themselves with margin-bottom, so the last one must
   not have any. */
.nt-card-bg > *:last-child { margin-bottom: 0; }

.card-blog {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.nt-blog-item > article,
.nt-post-featured > .row {
  height: 100%;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.nt-blog-item > article:hover,
.nt-post-featured > .row:hover {
  border-color: rgba(185, 175, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

/* 1.91, not 16/9. The featured images are 1200x628 — the Open Graph ratio, 1.911
   — so a 16/9 (1.778) box crops a visible strip off them for no reason. Two
   other rules further down had already been corrected to 1.91 individually; this
   is the base they all inherit from, so it was still cropping the archive grid.
   object-fit: cover stays, and matters more than the number: it means an upload
   that is not 1.91 gets cropped rather than stretched. */
.nt-blog-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.91;
  object-fit: cover;
}

/* Symmetric padding. The bottom used to be 18 against a 16 top, and the last
   child inside (.nt-blog-categories) added its own 10px margin on top of that —
   so the real gap was 16 above the title and 28 below the chips. Equal padding
   plus a zeroed last-child margin makes the card's inner frame even. */
.nt-blog-content { padding: 16px 18px; }
.nt-blog-content > header > *:last-child,
.nt-blog-content > *:last-child { margin-bottom: 0; }

.nt-blog-title h1,
.nt-blog-title h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.18;
  color: var(--text-strong);
}
.nt-blog-title h2 { font-size: clamp(19px, 2.2vw, 23px); }
.nt-blog-title a { color: inherit; text-decoration: none; }
.nt-blog-title a:hover,
.nt-blog-title a:hover h2 { color: var(--violet); }

.nt-block-date,
.nt-block-date div {
  font-size: 12.5px;
  color: var(--text-dim);
  font-style: normal;
}

.nt-blog-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.nt-blog-categories a,
.badge-blog {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(185, 175, 255, 0.3);
  border-radius: var(--r-pill);
  background: rgba(124, 111, 224, 0.12);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet);
  white-space: nowrap;
  transition: background 0.15s;
}
.nt-blog-categories a:hover { background: rgba(124, 111, 224, 0.24); }

/* Sticky / featured posts read one step louder than the grid. */
.nt-sticky-post .nt-blog-title h2 { font-size: clamp(22px, 2.6vw, 27px); }
.nt-post-featured { margin-bottom: 16px; }
/* 1.91 is the source ratio of the match graphics (1200x628), not a crop. The
   previous 16/10 shaved 16% off the WIDTH — and these images carry a player's
   face at each edge, so that came straight out of the faces. It also sat flush
   at border-radius 0, which only looks right on a full-bleed image; this one is
   inset by the column padding, so square corners read as a mistake. */
.nt-post-featured .nt-blog-image img {
  aspect-ratio: 1.91;
  border-radius: var(--r-sm);
}
/* The grid columns only carry HORIZONTAL padding, so the picture sat 9px in from
   the left and right but 1px from the top — flush against the card's rounded
   border, which made the rounding on the image look like a rendering fault.
   Matching the column's own 8px closes the frame on all three sides.
   Feed cards ONLY: the Popular Articles card wraps its image in an element that
   already carries .nt-card-bg padding, so adding this there pushed it to 15px
   top against 7px sides — the same fault, mirrored.
   And STACKED layouts only: from 768px the image becomes a column beside the
   text and is centred vertically, where a top pad just tips it off centre
   (measured 14px above / 6px below). */
@media (max-width: 767.98px) {
  .nt-post-featured .nt-blog-image { padding-top: 8px; }
}

/* --------------------------------------------------------------------------
   4. Single post
   -------------------------------------------------------------------------- */
.nt-blog-single > .card-blog-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
}
@media (min-width: 768px) {
  /* was 34px 38px 40px */
  .nt-blog-single > .card-blog-body { padding: 34px 38px; }
}
/* content.php tags the body <section class="mb-blog-5 nt-blog-content">, so a
   28px Bootstrap-era margin stacked on top of the card's own padding: measured
   35px above the article and 69px below it. The card frames the article; the
   article does not add to the frame. */
.nt-blog-single .nt-blog-content { margin-bottom: 0; }

/* --- The headline ----------------------------------------------------------
   No ornament. A panel, a soft glow and a hanging accent rule each went in here
   and each came back out: the article is already a bordered card and the hero
   image below it is another rounded rectangle, so every decoration just added a
   third box to a stack of two. What was actually missing was scale and air.
   The margin does the separating a box was being asked to do. */
.nt-blog-single .nt-blog-title { margin: 18px 0 26px; }

.nt-blog-single .nt-blog-title h1 {
  /* Both bounds are the largest step that still sets a typical headline in two
     lines, measured in Instrument Serif — which is about 25% narrower than the
     Georgia fallback, so sizes derived against the fallback come out far too
     timid. At 1280 a 52-character title holds two lines all the way to 56px, and
     even a 73-character one breaks the same at 44 as at 56; the ceiling is
     therefore a question of scale, not of wrapping, and 52 matches the main
     site's own display scale (.nt-h2 tops out at 56).
     On a phone the measure is only 320px and the picture is different: 32 is the
     last size that holds two lines, 34 spills to three. 32 against the 22px
     section headings is a 1.45 step, so the hierarchy reads without the title
     dominating the screen. */
  font-size: clamp(32px, 4.2vw, 52px);
  /* Tight for a display serif: at these sizes the default leading opens the two
     lines into separate blocks. */
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

/* --- The meta band reads as ONE component -------------------------------
   The chips are a label register (10.5px, uppercase, 600, letter-spaced) while
   the date was italic 12.5px grey — a different typographic language, and
   LARGER than the chips despite mattering less. Two registers side by side in
   one row is most of why this header felt like a pile of unrelated text.
   The date now shares the chips' register, so the row is a single band. */
.nt-blog .nt-blog-single .nt-block-date,
.nt-blog .nt-blog-single .nt-block-date div {
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* --text-slate, not --text-dim. The header panel's violet wash lightens the
     surface under this text, and dim measured 4.4:1 on the wash and 3.6:1 where
     the radial glow overlaps it — under the 4.5 AA floor for 10.5px type. */
  color: var(--text-slate);
  line-height: 24px;   /* matches the chips' height, so the row sits on one line */
  margin: 0;
}
/* 1.91 = the source ratio, so the hero crops nothing (16/8.6 was shaving a
   little off). ONE element owns the gap underneath: the image carried a 24px
   margin while its <figure-blog> wrapper carried another 20px, and the two
   stacked into an uneven 34px before the first paragraph. */
/* The wrapper owns the gap; everything inside is zeroed. Needs .nt-blog in front
   to outrank the grid shim's `.nt-blog .mb-blog-4`, which the markup also applies
   to the <figure-blog>. line-height:0 removes the inline baseline gap that
   <figure-blog> — an unknown element, so inline by default — was contributing. */
.nt-blog .nt-blog-single .nt-blog-image { margin-bottom: 24px; line-height: 0; }
.nt-blog .nt-blog-single .nt-blog-image figure-blog,
.nt-blog .nt-blog-single .nt-blog-image figure { display: block; margin: 0; }
.nt-blog-single .nt-blog-image img {
  aspect-ratio: 1.91;
  border-radius: var(--r-md);
  margin-bottom: 0;
}
.nt-blog-single .nt-blog-content { padding: 0; }

/* --- Article body: everything the editor can emit ----------------------- */
.nt-blog-single .nt-blog-content,
.entry-content {
  /* A measure, not the full column: long-form text is unreadable at 1140px.
     68ch lands at ~71 characters a line, inside the 45-75 comfort range. */
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-muted-2);
}
.nt-blog-single .nt-blog-content > *:first-child { margin-top: 0; }
/* Posts carry leftover empty elements from the editor — a
   <div style="text-align:center;padding:20px"></div> worth 40px of unexplained
   gap, and empty <p>s whose collapsed margins push whatever follows further down
   than the rhythm intends. Collapse anything with no content of its own.
   :not(:has(img,iframe,svg)) keeps genuine media-only wrappers alive. */
.nt-blog-single .nt-blog-content div:empty:not(:has(img, iframe, svg)),
.nt-blog-single .nt-blog-content p:empty { display: none; }

.nt-blog-single .nt-blog-content h2,
.nt-blog-single .nt-blog-content h3,
.nt-blog-single .nt-blog-content h4,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.wp-block-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-strong);
  margin: 34px 0 12px;
}
/* 26px max, not 29. Against a 40px H1 in the same family, weight and colour, 29
   left a ratio of only 1.38 — close enough that the opening section heading read
   as a second title. 26 puts it at 1.54, a clear step down. */
.nt-blog-single .nt-blog-content h2, .entry-content h2 { font-size: clamp(22px, 2.6vw, 26px); }
.nt-blog-single .nt-blog-content h3, .entry-content h3 { font-size: clamp(19px, 2.4vw, 23px); }
.nt-blog-single .nt-blog-content h4, .entry-content h4 { font-size: 18px; }

/* --- Sections as modules -------------------------------------------------
   These posts run 9 headings over ~37 paragraphs. A hairline above each H2,
   with real space around it, turns that into distinct blocks you can scan and
   resume — without adding a visible box or any weight to the page.
   text-wrap: balance stops a heading dropping one lonely word onto line two. */
.nt-blog-single .nt-blog-content h2,
.entry-content h2 {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-faint);
  text-wrap: balance;
}
/* The first heading keeps its rule too. Without it nothing marked where the
   header block ended: the article title and the opening section heading are the
   same family, weight and colour at only a 1.4 size ratio, so with the hero image
   between them they read as two competing titles rather than a header followed by
   a body. The rule is what closes the header. */
.nt-blog-single .nt-blog-content > h2:first-of-type,
.entry-content > h2:first-of-type { margin-top: 32px; }
.nt-blog-single .nt-blog-content h3,
.entry-content h3 { margin-top: 36px; text-wrap: balance; }

/* 26px, not 18. The gap between paragraphs has to beat the gap between the lines
   INSIDE one — at 18px against a 29px line height the ratio was 0.62, so a
   paragraph's own lines sat further apart than the paragraphs did and nine
   sections read as one slab. 26px puts it at ~0.88: separate blocks, still one
   piece of prose. */
.nt-blog-single .nt-blog-content p,
.entry-content p { margin: 0 0 26px; }

/* Lead paragraph — one notch up, the standard editorial opening.
   Fires only on posts that actually OPEN with prose. The current ones start with
   an <h2> (preceded by an empty <p> the editor left behind, which :first-of-type
   matches and which is display:none), so there it is simply inert rather than
   promoting the wrong element. */
.nt-blog-single .nt-blog-content > p:first-of-type:not(:empty),
.entry-content > p:first-of-type:not(:empty) {
  font-size: 18.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Bold runs are the scan anchors in a wall of prose, so they get the brightest
   text colour rather than just more weight. */
.nt-blog-single .nt-blog-content strong,
.nt-blog-single .nt-blog-content b,
.entry-content strong,
.entry-content b { color: var(--text-strong); font-weight: 600; }

.nt-blog-single .nt-blog-content a,
.entry-content a {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.nt-blog-single .nt-blog-content a:hover,
.entry-content a:hover { color: var(--violet-light); }

.nt-blog-single .nt-blog-content ul,
.nt-blog-single .nt-blog-content ol,
.entry-content ul,
.entry-content ol { margin: 0 0 18px; padding-left: 22px; }
.nt-blog-single .nt-blog-content li,
.entry-content li { margin-bottom: 7px; }
.nt-blog-single .nt-blog-content li::marker,
.entry-content li::marker { color: var(--violet); }

.nt-blog-single .nt-blog-content blockquote,
.entry-content blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--violet);
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
  color: var(--text-muted);
}
.nt-blog-single .nt-blog-content blockquote p:last-child,
.entry-content blockquote p:last-child { margin-bottom: 0; }

.nt-blog-single .nt-blog-content img,
.entry-content img { border-radius: var(--r-md); margin: 8px 0; }

.nt-blog-single .nt-blog-content code,
.entry-content code {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.nt-blog-single .nt-blog-content pre,
.entry-content pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-alt);
  /* Code scrolls inside its own box; the page must never scroll sideways
     because of one long line. */
  overflow-x: auto;
}
.nt-blog-single .nt-blog-content pre code,
.entry-content pre code { padding: 0; background: none; }

.nt-blog-single .nt-blog-content hr,
.entry-content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--border); }

/* Tables get their own scroller, same reason as <pre>. */
.nt-blog-single .nt-blog-content table,
.entry-content table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.nt-blog-single .nt-blog-content th, .nt-blog-single .nt-blog-content td,
.entry-content th, .entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.nt-blog-single .nt-blog-content th, .entry-content th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-strong);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. WordPress core classes
   -------------------------------------------------------------------------- */
.alignleft  { float: left;  margin: 6px 22px 14px 0; }
.alignright { float: right; margin: 6px 0 14px 22px; }
.aligncenter { display: block; margin: 14px auto; }
.alignwide, .alignfull { max-width: 100%; }

.wp-caption { max-width: 100%; margin-bottom: 18px; }
.wp-caption img { display: block; }
.wp-caption-text,
.gallery-caption {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
}

.gallery { display: grid; gap: 10px; margin: 0 0 20px; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6,
.gallery-columns-7,
.gallery-columns-8,
.gallery-columns-9 { grid-template-columns: repeat(6, 1fr); }
.gallery-item img { border-radius: var(--r-sm); }

.sticky { display: block; }
.bypostauthor { display: block; }

.page-links { margin: 20px 0; font-size: 14px; color: var(--text-dim); }
.page-links a { color: var(--violet); }

/* Hidden from sight but reachable by keyboard: the skip link has to become
   visible when it receives focus, or it is useless to the people it exists for. */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto; height: auto;
  margin: 0; padding: 10px 16px;
  clip: auto; clip-path: none;
  background: var(--purple);
  color: #fff;
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   6. Sidebar + widgets
   -------------------------------------------------------------------------- */
/* Deliberately NOT sticky. Measured live, the rail is ~1525px against a 900px
   viewport, and a sticky box taller than the viewport pins its top and puts its
   own bottom permanently out of reach — you can never scroll to the last widget.
   Letting it scroll with the page is the honest behaviour at this length. */
#secondary.widget-area { position: static; }
@media (max-width: 991.98px) {
  #secondary.widget-area { margin-top: 24px; }
}

.widget {
  margin-bottom: 18px;
  /* was 18px 18px 20px — the extra 2px at the bottom had no reason to exist */
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.widget:last-child { margin-bottom: 0; }
/* Widget lists end flush with the padding instead of adding a trailing margin. */
.widget > *:last-child { margin-bottom: 0; }

.widget-title,
.nt-section-title,
.nt-section-heading {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-label);
}

.widget ul { margin: 0; padding: 0; list-style: none; }
/* The categories widget renders every category — 20 of them, 859px measured on
   the live blog. Fine as a sticky desktop rail, but stacked under the posts on a
   phone it is a wall of links, so cap it and let it scroll on its own.
   ONLY this widget: the recent-posts one holds 4 items, and capping that just
   added a scrollbar to something that already fit. */
@media (max-width: 991.98px) {
  .widget_categories ul,
  .nerdytips_blog_categories ul { max-height: 320px; overflow-y: auto; }
}
.widget li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border-faint);
  font-size: 14px;
  color: var(--text-slate);
}
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget a { color: var(--text-muted-2); transition: color 0.15s; }
.widget a:hover { color: var(--violet); }

/* Recent posts with thumbnails — SIDEBAR ONLY.
   .nt-popular-news-item used to be bundled in here, which is what turned the
   full-width Popular Articles cards into 68x50 thumbnails. That section defines
   its own layout in §14.

   Three things were wrong and had to be fixed together:
   1. `flex` sat on the <li>, but the flex ROW is the .nt-post-item-inner div
      inside it, so the intended thumbnail-beside-title layout never formed.
   2. The size went on the <img>, while the shrinking element is its
      .nt-blog-image wrapper — a flex item at default flex-shrink:1. It collapsed
      and squeezed the picture to 39px in a narrow rail.
   3. .nt-blog-image img sets aspect-ratio 16/9 for post cards, and nothing reset
      it here, so the 68x50 box fought a 16/9 ratio and rendered distorted.
   The wrapper now carries a non-shrinking basis and the ratio is explicitly
   released. */
.nt-recent-posts-widget { margin: 0; padding: 0; list-style: none; }
.nt-recent-posts-widget li { display: block; }

.nt-post-item-inner { display: flex; gap: 12px; align-items: center; width: 100%; }
.nt-post-item-inner .nt-blog-image { flex: 0 0 76px; }
/* 76x40 ≈ 1.9:1, the source ratio of the match graphics, so cover crops next to
   nothing. The old 72x54 box (1.33) was squeezing a 1.9 image — and the widget
   was asking for the 150x150 'thumbnail' on top of that, which had already
   thrown the players away. Both had to change; the box alone cannot recover
   pixels the crop deleted. */
.nt-post-item-inner .nt-blog-image img {
  width: 76px;
  height: 40px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: var(--r-xs);
}
/* min-width:0 lets a long headline wrap inside the rail instead of forcing the
   flex row wider than the sidebar. */
.nt-post-item-inner .nt-blog-content { flex: 1 1 auto; min-width: 0; padding: 0; }
/* The card headline style (serif, up to 23px) is unreadable at rail width next
   to a 72px thumbnail — this is a list row, so it gets list-row type.
   NOTE the widget wraps the title in a bare <a>, NOT an <h2> like the post cards
   do, so both have to be addressed or the rule silently matches nothing. */
.nt-post-item-inner .nt-blog-title { margin: 0; }
.nt-post-item-inner .nt-blog-title h2,
.nt-post-item-inner .nt-blog-title > a {
  display: block;
  margin: 0 0 3px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted-2);
}
.nt-post-item-inner .nt-blog-title > a:hover,
.nt-post-item-inner .nt-blog-title a:hover h2 { color: var(--violet); }
.nt-post-item-inner .nt-block-date,
.nt-post-item-inner .nt-block-date div { font-size: 11.5px; margin: 0; }

/* --------------------------------------------------------------------------
   7. Search
   -------------------------------------------------------------------------- */
.search-title-bar { margin: 0 0 18px; }
.search-title-text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 400;
  color: var(--text-strong);
}

.nt-search-form,
.widget_search form,
.wp-block-search__inside-wrapper { display: flex; gap: 8px; position: relative; }

/* width:100% is what actually stretches this, NOT the flex shorthand.
   searchform.php wraps the input in a plain <div> (it has to be the positioned
   ancestor for the results dropdown), and that div is display:block — so `flex`
   on the input is inert and it fell back to its intrinsic size: 188px inside a
   244px wrapper, leaving a 64px hole before the submit button instead of the
   form's 8px gap. */
.search-field,
.wp-block-search__input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
/* 16px on iOS: anything smaller makes Safari zoom the viewport on focus. Same
   guard the main site puts on every text input. */
@supports (-webkit-touch-callout: none) {
  .search-field, .wp-block-search__input { font-size: 16px; }
}
.search-field::placeholder { color: var(--text-dim-2); }
.search-field:focus,
.wp-block-search__input:focus { outline: none; border-color: var(--border-violet); }

.search-submit,
.wp-block-search__button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--purple), var(--violet-2));
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Live results dropdown, fed by initLiveSearch() in blog.js.

   nt_live_search_function() emits, per hit:
       <div class="search-result-item"><a><img …><span>title</span></a></div>
   with WordPress's 'thumbnail' size. Unstyled, that image took the dropdown's
   full width (~325px tall) and the title wrapped over three lines, so ONE result
   filled the box and the other four were behind a scrollbar.

   As a row — 52x40 cover thumb, title clamped to two lines — a hit is ~58px, so
   all five the query returns fit at once and the scrollbar never appears. */
.search-results-container {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  width: 100%;
  max-height: 360px;
  margin-top: 6px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-alt);
  border: 1px solid var(--border-violet);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 175, 255, 0.35) transparent;
}
.search-results-container::-webkit-scrollbar { width: 8px; }
.search-results-container::-webkit-scrollbar-thumb {
  background: rgba(185, 175, 255, 0.3);
  border-radius: 999px;
}

.search-result-item + .search-result-item { border-top: 1px solid var(--border-faint); }
.search-results-container a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted-2);
  transition: background 0.12s, color 0.12s;
}
.search-results-container a:hover { background: rgba(124, 111, 224, 0.16); color: var(--violet); }

/* 72x38 ≈ 1.9:1, matching the source graphics, so cover crops essentially
   nothing. A squarer box (52x40 was the first attempt) threw away 23% of the
   height on top of the crop the image already carried, leaving a centre sliver. */
.search-result-item img {
  flex: 0 0 72px;
  width: 72px;
  height: 38px;
  /* the post-card 16/9 rule would fight this fixed box */
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: var(--r-xs);
}
/* Two lines, then ellipsis — a long headline must not push the row to 4 lines
   and turn five results back into two. min-width:0 lets it actually shrink. */
.search-result-item span {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-results-container .no-results {
  padding: 14px 10px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.no-result-container { padding: 40px 0; text-align: center; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   8. Pagination + post navigation
   -------------------------------------------------------------------------- */
.pagination-container { margin: 26px 0 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0; margin: 0; list-style: none; }
.page-item { display: block; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.page-link:hover { border-color: var(--border-violet); color: var(--violet); }
.page-item.active .page-link {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.nt-prev-icon, .nt-next-icon { display: inline-flex; }
/* Only icon-back.svg (a left arrow) ships, so the "next" button reuses it
   mirrored — otherwise both arrows point left. */
.nt-next-icon img { transform: scaleX(-1); }
/* The gap marker between page ranges: a label, not a button. No border,
   no background, no hover, not clickable. */
.page-item.disabled .page-link,
.nt-ellipsis {
  border-color: transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: default;
  pointer-events: none;
}

.post-navigation,
.posts-navigation,
.comment-navigation { margin: 26px 0; font-size: 14px; }
.post-navigation a,
.posts-navigation a,
.comment-navigation a { color: var(--violet); }
.nav-previous, .nav-next { display: inline-block; }
.nav-next { float: right; }

.nt-blog-back,
.btn-wrap a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border-chip);
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted-2);
}
.nt-blog-back:hover { border-color: var(--border-violet); color: var(--violet); }

/* --------------------------------------------------------------------------
   9. Comments
   -------------------------------------------------------------------------- */
.comments-area {
  margin-top: 26px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.comments-title,
.comment-reply-title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-strong);
}
.comment-list { margin: 0 0 24px; padding: 0; list-style: none; }
.comment-list .children { margin: 14px 0 0 22px; padding: 0; list-style: none; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--border-faint); }
.comment-author { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.comment-author img { border-radius: var(--r-pill); }
.comment-metadata { font-size: 12px; color: var(--text-dim); }
.comment-metadata a { color: inherit; }
.comment-content { margin-top: 8px; font-size: 15px; color: var(--text-muted-2); }
.reply a { font-size: 13px; font-weight: 600; color: var(--violet); }

.comment-form { display: grid; gap: 12px; }
.comment-form label { font-size: 12.5px; font-weight: 600; color: var(--text-slate); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
@supports (-webkit-touch-callout: none) {
  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form input[type="url"],
  .comment-form textarea { font-size: 16px; }
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--border-violet); }
.comment-form .submit {
  justify-self: start;
  height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--purple), var(--violet-2));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   10. 404 / empty states
   -------------------------------------------------------------------------- */
.error-404,
.page-content {
  padding: 48px 0;
  text-align: center;
}
.page-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 400;
  color: var(--text-strong);
}
.page-content p { color: var(--text-muted); }

.no-results.not-found,
.page-header { text-align: center; }
.no-comments { color: var(--text-dim); font-size: 14px; }
.site-main { display: block; }

/* 404's "Back to Blog Page" — the theme asks for .btn.nt-btn-primary. */
.nt-btn-primary,
.nt-blog .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--purple), var(--violet-2));
  box-shadow: var(--shadow-cta);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nt-btn-primary:hover, .nt-blog .btn:hover { opacity: 0.88; color: #fff; }

/* --------------------------------------------------------------------------
   11. Empty search state (search.php)

   The icon is built from bare divs, not an SVG — .file-icon carries a folded
   corner via ::after and .magnifier-icon is a ring plus a rotated handle. It had
   no styling at all after the old design was removed, so it rendered as three
   invisible empty boxes.
   -------------------------------------------------------------------------- */
.no-result-content { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.no-result-icon { position: relative; width: 92px; height: 92px; margin-bottom: 14px; }

.file-icon {
  position: absolute;
  inset: 8px 20px 12px 8px;
  border: 2px solid var(--text-dim);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.file-icon::after {
  content: "";
  position: absolute;
  top: -2px; right: -2px;
  width: 18px; height: 18px;
  border-left: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  border-radius: 0 8px 0 4px;
  background: var(--bg);
}
.file-face {
  position: absolute;
  left: 50%; top: 54%;
  width: 26px; height: 12px;
  transform: translate(-50%, -50%);
  border-bottom: 2px solid var(--text-dim);
  border-radius: 0 0 26px 26px;
}
.magnifier-icon {
  position: absolute;
  right: 4px; bottom: 6px;
  width: 34px; height: 34px;
  border: 3px solid var(--violet);
  border-radius: 50%;
  background: transparent;
}
.magnifier-icon::after {
  content: "";
  position: absolute;
  right: -9px; bottom: -5px;
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--violet);
  transform: rotate(-45deg);
}

.no-result-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 400;
  color: var(--text-strong);
}
.no-result-text { margin: 0; font-size: 14.5px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   12. Search form (searchform.php) + sidebar toggle
   -------------------------------------------------------------------------- */
.search-form { position: relative; }
.search-submit-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.search-submit-btn:hover { background: rgba(124, 111, 224, 0.18); border-color: var(--border-violet); }
.search-submit-btn img { width: 18px; height: 18px; }

/* The theme uses Bootstrap 4's .sr-only name in searchform.php; give it the same
   treatment as .screen-reader-text rather than leaving the label visible. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Leftover of the old off-canvas sidebar pattern: a toggle that flips
   #secondary.active. This design reaches secondary navigation through the header
   drawer, and the sidebar now sits in normal flow under the posts, so the button
   toggles a state nothing renders — it was just a stray icon floating under the
   search box. Hidden rather than deleted, because the markup lives in
   searchform.php and blog.js still binds to it harmlessly. */
.active-nt-sidebar { display: none; }

/* --------------------------------------------------------------------------
   13. Post meta (inc/template-tags.php) and entry parts
   -------------------------------------------------------------------------- */
.entry-header { margin-bottom: 12px; }
.entry-title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1.2;
  color: var(--text-strong);
}
.entry-title a { color: inherit; }
.entry-title a:hover { color: var(--violet); }

.entry-summary { font-size: 15px; color: var(--text-muted); }

.entry-meta,
.entry-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.entry-footer { margin-top: 12px; }
.entry-meta a,
.entry-footer a { color: var(--text-slate); }
.entry-meta a:hover,
.entry-footer a:hover { color: var(--violet); }

.posted-on, .byline, .cat-links, .tags-links, .comments-link, .edit-link { display: inline-flex; gap: 4px; }
.entry-date, .author, .vcard { font-style: normal; }
.post-thumbnail { display: block; margin-bottom: 14px; }
.post-thumbnail img { width: 100%; border-radius: var(--r-md); }

/* --------------------------------------------------------------------------
   14. Popular articles section

   Two regressions lived here. section-new.php already marks each item up as
   `.nt-popular-news-item.col-md-6` — two per row from 768px — but this file made
   the wrapper `display: grid`, and grid items ignore the flex-basis the col-*
   classes set, so every card collapsed to one per row. And the 68x50 thumbnail
   rule below was written for the SIDEBAR widget, yet matched here too, shrinking
   full-width cover images to postage stamps.

   So: the wrapper stays a plain .row (the grid shim handles it), and the small
   thumbnail is scoped to the widget that actually wants it.
   -------------------------------------------------------------------------- */
.nt-popular-news-section { margin-top: 26px; }

/* .nt-popular-news is the list variant in section-popular.php, whose items carry
   no col-* classes — it needs its own responsive track definition. */
.nt-popular-news {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.nt-popular-news-item { display: block; margin-bottom: 16px; }
.nt-popular-news-item > article { height: 100%; }
.nt-popular-news-item .nt-blog-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.91; /* the uploads' real ratio — see .nt-blog-image img */
  object-fit: cover;
  border-radius: var(--r-sm);
}
.nt-popular-news-item .nt-blog-title h2 { font-size: clamp(17px, 1.6vw, 20px); margin: 0 0 8px; }
.nt-popular-news-item figure { margin: 0 0 12px; }

.nt-sticky { position: relative; }
/* .nt-post-item-inner is the sidebar recent-posts row — defined once in §6.
   A second copy lived here and fought it; the later one won on source order and
   reintroduced the collapsed thumbnail. */
