/* ==========================================================================
   tejaspatel.me — Ghost theme
   A like-for-like port of the MyThemeShop "Business" design.

   EVERY TOKEN BELOW WAS MEASURED off the live WordPress site with
   getComputedStyle, not read out of its stylesheet and not eyeballed from a
   screenshot. The stylesheet tells you what was written; the rendered page
   tells you what it looks like.

     body            #EBEBEB  bg, #004466 text, Poppins 16px/20px
     main container  1072px, max-width 96%, #FFFFFF
     content 694px | sidebar 375px  (at 1440 viewport)
     header          #E8F0FF, 131px tall
     wordmark        Aclonica 65px 700 #0066AA
     nav             Poppins 14px uppercase 400 #004466
     post title      Poppins 28px/39.2px 700 #004466
     links           #0066AA, no underline
     widget title    Poppins 20px 700 #004466
     footer top      #F3F7FE ; footer text #252525

   The 16px/20px body leading is genuinely what the site uses -- verified across
   11 consecutive paragraphs, not one sample. It is tight; it is also the design.
   ========================================================================== */

:root {
  --ink:        #004466;
  --ink-soft:   #3b6e88;
  --brand:      #0066aa;
  --brand-dark: #005490;
  --accent:     #11cc11;
  --page-bg:    #ebebeb;
  --surface:    #ffffff;
  --header-bg:  #e8f0ff;
  --footer-bg:  #f3f7fe;
  --footer-ink: #252525;
  --rule:       #e5e5e5;
  --shadow:     0 1px 3px rgba(0, 34, 51, .08);

  --container:  1072px;
  --sidebar-w:  330px;
  --gap:        32px;

  --font:       'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Aclonica', 'Poppins', sans-serif;
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* clip, NOT hidden. `overflow-x: hidden` on html/body creates a scroll
     container that silently kills position:sticky further down the tree --
     that cost a fleet site its sticky header. `clip` contains overflow
     without establishing a scrollport. */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; border: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover, a:focus-visible { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; font-weight: 700; line-height: 1.3; color: var(--ink); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 999;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 10px 16px; background: var(--brand); color: #fff; border-radius: 4px;
}

/* --- shell ---------------------------------------------------------------- */
.main-container {
  width: var(--container);
  max-width: 96%;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.wrap { padding: 0 20px 40px; }

.wrap--sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: var(--gap);
  align-items: start;
}
/* minmax(0, 1fr) not 1fr: a grid item's default min-width is auto, so one wide
   child (a table, a <pre>, a 300px ad) pushes the whole column past the track
   and the PAGE overflows horizontally. This single line prevents most of it. */
.content-col { min-width: 0; }

/* --- header --------------------------------------------------------------- */
.site-header { background: var(--header-bg); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 20px;
}

.brand-text {
  font-family: var(--font-brand);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand);
  display: inline-block;
}
.brand-text:hover { text-decoration: none; color: var(--brand-dark); }
.brand-logo img { max-height: 76px; width: auto; }
.site-tagline { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }

.site-nav ul {
  /* {{navigation}} emits its OWN <ul class="nav">. Wrapping it in another <ul>
     gives nested lists and visible bullet markers -- style this, never wrap. */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: .01em;
  padding: 6px 0;
  display: inline-block;
}
.site-nav a:hover, .site-nav .nav-current a { color: var(--brand); text-decoration: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(0, 68, 102, .25);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* --- page heads ----------------------------------------------------------- */
.page-head { padding: 28px 0 18px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.page-head__title { font-size: 28px; line-height: 1.25; margin: 0 0 6px; }
.page-head__sub { margin: 0; color: var(--ink-soft); }
.page-head__count { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.page-head__avatar { border-radius: 50%; display: block; margin-bottom: 10px; }

.section-title { font-size: 20px; margin: 32px 0 16px; }

/* --- breadcrumb ----------------------------------------------------------- */
.breadcrumb { padding: 20px 0 12px; font-size: 16px; color: var(--ink); line-height: 1.5; }
.breadcrumb a { color: var(--brand); }
.breadcrumb-sep { margin: 0 6px; color: var(--ink-soft); }
.breadcrumb-current { color: var(--ink); }

/* --- single post ---------------------------------------------------------- */
.single { padding-bottom: 8px; }
.single__title { font-size: 28px; line-height: 39.2px; font-weight: 700; margin: 0 0 18px; }

.single__meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline;
  padding: 14px 0; margin-bottom: 22px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: 14px; color: var(--ink-soft);
}
.single__cats a { font-weight: 600; }

.single__media { margin: 0 0 22px; }
.single__media img { display: block; width: 100%; }
.single__media figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }

.single__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.single__tags a {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: var(--header-bg); color: var(--ink);
}
.single__tags a:hover { background: var(--brand); color: #fff; text-decoration: none; }

/* --- post content --------------------------------------------------------- */
.post-content { font-size: 16px; line-height: 20px; color: var(--ink); }

/* Reset with `> *` only. `.post-content p { margin: 0 }` out-specifies
   `.post-content > * + *` and silently deletes every paragraph gap. */
.post-content > * { margin-top: 0; }
.post-content > * + * { margin-top: 20px; }

.post-content p { margin-bottom: 20px; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 { margin: 28px 0 12px; }
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 18px; }

/* The imported WordPress content wraps whole paragraphs and headings in
   <strong>. A colour here turns entire post bodies a different colour, so it
   must inherit. Same for <em>. */
.post-content strong, .post-content b { color: inherit; font-weight: 700; }
.post-content em, .post-content i { color: inherit; }

.post-content img { display: block; height: auto; margin: 20px auto; }
.post-content figure { margin: 20px 0; }
.post-content figcaption { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 8px; }

.post-content ul, .post-content ol { margin: 0 0 20px; padding-left: 22px; }
.post-content li { margin-bottom: 8px; }

.post-content blockquote {
  margin: 22px 0; padding: 8px 0 8px 18px;
  border-left: 4px solid var(--brand); color: var(--ink-soft); font-style: italic;
}

.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-content th, .post-content td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; }

/* Long words and URLs are the other half of mobile overflow. */
.post-content { overflow-wrap: break-word; }
.post-content a { overflow-wrap: break-word; }

/* Any wide child scrolls INSIDE itself; the page never scrolls sideways. */
.post-content pre,
.post-content table,
.post-content .kg-width-full { overflow-x: auto; max-width: 100%; }
.post-content pre { background: #f6f8fa; padding: 14px; border-radius: 6px; }

/* Koenig widths. gscan errors if these are absent. */
.kg-width-wide { max-width: min(100%, 1040px); margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: 100%; }
.kg-image { max-width: 100%; height: auto; }

/* 🚨 `.post-content a` is (0,2,0) and OUT-SPECIFIES `.btn` (0,1,0). A button
   placed inside any post or page body therefore renders as a plain link colour.
   The content-link rule has to be undone explicitly for buttons. */
.btn,
.post-content a.btn {
  display: inline-block;
  padding: 11px 22px;
  background: var(--brand);
  color: #fff;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.btn:hover, .post-content a.btn:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.btn--ghost, .post-content a.btn--ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn--ghost:hover, .post-content a.btn--ghost:hover { background: var(--brand); color: #fff; }

/* --- home ----------------------------------------------------------------- */
.wrap--full { max-width: 100%; }
.home-content { padding-top: 26px; }
.home-content img { max-width: 100%; height: auto; }

/* --- listing -------------------------------------------------------------- */
.loop--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
/* auto-FILL, not auto-fit. With auto-fit a 2-card row stretches each card to
   half the container while a 6-card row sits at the minimum -- the same
   component rendering at three different sizes across the site. */

.loop-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  min-width: 0;
}
.loop-card__media { display: block; aspect-ratio: 16 / 9; background: var(--header-bg); }
.loop-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loop-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1 1 auto; }
.loop-card__title { font-size: 17px; line-height: 1.35; margin: 0 0 8px; }
.loop-card__title a { color: var(--ink); }
.loop-card__title a:hover { color: var(--brand); text-decoration: none; }
.loop-card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.loop-card__tag { font-weight: 600; }
.loop-card__excerpt { margin: 0 0 14px; font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.loop-card__more { margin-top: auto; align-self: flex-start; font-size: 14px; font-weight: 600; }

/* --- pagination ----------------------------------------------------------- */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 34px 0 0; padding-top: 20px; border-top: 1px solid var(--rule);
  font-size: 14px;
}
.pagination a { padding: 9px 16px; border: 1px solid var(--brand); border-radius: 4px; }
.pagination a:hover { background: var(--brand); color: #fff; text-decoration: none; }
.page-number { color: var(--ink-soft); }

/* --- sidebar -------------------------------------------------------------- */
.sidebar { min-width: 0; padding-top: 26px; }
.widget { margin-bottom: 40px; }
.widget-title { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.widget-title a { color: inherit; }

.widget--promo { text-align: center; }
.promo-logo img { display: inline-block; width: 130px; height: auto; }
.widget--promo .widget-title { margin-top: 10px; }
.promo-text { font-style: italic; font-size: 15px; line-height: 21px; margin: 0 0 14px; }
.promo-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.promo-links img { width: 32px; height: 32px; display: block; }
.promo-links svg { width: 32px; height: 32px; display: block; color: var(--brand); }
.promo-links a:hover svg { color: var(--brand-dark); }
/* WCAG 2.5.8 AA is 24x24; these are 32px images inside a 44px hit area. */
.promo-links a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

.fb-embed { max-width: 100%; overflow: hidden; }
.fb-embed iframe { max-width: 100%; border: 0; }

.tag-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.tag-list li { border-bottom: 1px solid var(--rule); }
.tag-list a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; color: var(--ink); font-size: 14px; }
.tag-list a:hover { color: var(--brand); text-decoration: none; }
.tag-count { color: var(--ink-soft); font-size: 12px; }

.subscribe-form { display: flex; flex-wrap: wrap; gap: 8px; }
.subscribe-form input {
  flex: 1 1 160px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: 4px; font: inherit; font-size: 14px;
}
.subscribe-form button {
  padding: 10px 18px; background: var(--brand); color: #fff;
  border: 0; border-radius: 4px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.subscribe-form button:hover { background: var(--brand-dark); }
.form-msg { flex: 1 0 100%; margin: 4px 0 0; font-size: 13px; color: #b3261e; }

/* --- ads ------------------------------------------------------------------ */
.ad-slot { margin: 24px 0; text-align: center; min-width: 0; }
.ad-label {
  display: block; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: #9aa7b0; margin-bottom: 4px;
}
.ad-slot ins { display: block; }
/* An ad is the classic cause of grid overflow: a fixed unit cannot shrink, and
   it stretches its whole grid row. Contain it. */
.ad-slot { max-width: 100%; overflow: hidden; }

/* --- comments / related --------------------------------------------------- */
.comments { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--rule); }
.comments__off { color: var(--ink-soft); font-size: 14px; }
.related { margin-top: 30px; }

/* --- footer --------------------------------------------------------------- */
.site-footer { margin-top: 10px; }
.top-footer { background: var(--footer-bg); padding: 18px 20px; }
.top-footer .ad-slot { margin: 0; }
.bottom-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 20px; color: var(--footer-ink); font-size: 16px;
}
.bottom-footer a { color: var(--brand); }
.copyright { margin: 0; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }

/* --- back to top ---------------------------------------------------------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 18px; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
  box-shadow: 0 2px 8px rgba(0, 34, 51, .25);
}
.to-top.is-visible { opacity: .92; visibility: visible; }
.to-top:hover { opacity: 1; }

/* --- 404 ------------------------------------------------------------------ */
.err { text-align: center; padding: 70px 0 90px; }
.err__code { font-family: var(--font-brand); font-size: 76px; color: var(--brand); margin: 0; line-height: 1; }
.err__msg { font-size: 18px; margin: 12px 0 22px; }

/* ==========================================================================
   RESPONSIVE
   Breakpoints are placed where THIS layout actually breaks, measured, not
   copied: the 694 + 330 two-column needs ~1024 to hold, the card grid drops to
   one column under ~620, and the wordmark has to come down well before 375.
   ========================================================================== */

/* Tablet landscape and below: sidebar goes under the content. */
@media (max-width: 1024px) {
  :root { --sidebar-w: 300px; --gap: 24px; }
}

@media (max-width: 980px) {
  .wrap--sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding-top: 8px; border-top: 1px solid var(--rule); }
  .widget { margin-bottom: 32px; }
  .widget--promo { max-width: 420px; margin-left: auto; margin-right: auto; }
}

/* Tablet portrait: collapse the nav behind a toggle. */
@media (max-width: 860px) {
  .header-inner { padding: 16px 16px; }
  .brand-text { font-size: 38px; }
  .nav-toggle { display: block; order: 2; }
  .site-nav { order: 3; flex: 1 0 100%; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-top: 1px solid rgba(0, 68, 102, .12); }
  .site-nav a { display: block; padding: 13px 2px; }
}

@media (max-width: 620px) {
  .main-container { max-width: 100%; }
  .wrap { padding: 0 14px 30px; }
  .loop--grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .single__title, .page-head__title { font-size: 23px; line-height: 1.3; }
  .post-content h2 { font-size: 21px; }
  .post-content h3 { font-size: 19px; }
  .breadcrumb { font-size: 14px; }
  .single__meta { font-size: 13px; gap: 6px 14px; }
  .bottom-footer { font-size: 14px; justify-content: center; text-align: center; }
  .pagination { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 400px) {
  .header-inner { padding: 14px 12px; }
  .brand-text { font-size: 30px; }
  .wrap { padding: 0 12px 26px; }
  .single__title, .page-head__title { font-size: 21px; }
  .promo-links { gap: 6px; }
  .to-top { right: 10px; bottom: 10px; }
}

/* 320px is the floor the responsive audit measures. Nothing below this width
   may introduce a fixed dimension wider than the viewport. */
@media (max-width: 340px) {
  .brand-text { font-size: 26px; }
  .promo-links img { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   HOMEPAGE MODULES
   The WordPress front page was a theme-option "callout" plus a "features" block.
   The callout is now the `home` page's own body (native Lexical, so the owner can
   edit it); the features are one html card appended to it. These styles target
   that card. Everything sits INSIDE .post-content, so specificity has to clear
   the content rules -- .post-content ul is (0,2,1) and beats a bare .svc-grid.
   ========================================================================== */
.tp-services { margin: 40px 0 10px; }
.tp-services__title { font-size: 24px; text-align: center; margin: 0 0 22px; }

.post-content ul.svc-grid,
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-content ul.svc-grid > li,
.svc-grid > li { margin: 0; }

.svc-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  background: var(--surface);
  min-width: 0;
}
.svc-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 12px; color: var(--brand); }
.svc-card__icon svg { width: 40px; height: 40px; }
.svc-card__title { font-size: 19px; margin: 0 0 10px; }
.svc-card__body { font-size: 15px; line-height: 21px; color: var(--ink-soft); text-align: left; }
.svc-card__body p { margin: 0 0 10px; }
.svc-card__body p:last-child { margin-bottom: 0; }

/* The callout leads with a full-bleed portrait; keep it from dwarfing the page. */
.home-content > .kg-image-card:first-child img,
.home-content img:first-of-type { border-radius: 8px; }

@media (max-width: 620px) {
  .tp-services__title { font-size: 21px; }
  .post-content ul.svc-grid, .svc-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .svc-card { padding: 20px 16px; }
}

/* --- contact block (replaces the WordPress [wpforms] shortcode) ------------ */
.contact-block { margin: 22px 0 0; }
.contact-block__lead { font-weight: 600; margin: 0 0 14px; }
.post-content ul.contact-list,
.contact-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0 0 16px; padding: 0; }
.post-content ul.contact-list > li,
.contact-list > li { margin: 0; }
.contact-block__note { font-size: 15px; color: var(--ink-soft); margin: 0; }

@media (max-width: 400px) {
  /* flex: 1 1 100% so the row sets the width and a long label wraps inside its
     own button rather than pushing the page wider. */
  .post-content ul.contact-list > li, .contact-list > li { flex: 1 1 100%; }
  .contact-list .btn { display: block; text-align: center; }
}

/* Breadcrumb links measured 2 sub-24px tap targets on every post at every width
   (they are the only <nav> links on that template). WCAG 2.5.8 AA exempts links
   inline INSIDE a sentence; a breadcrumb is standalone navigation, so it is not
   exempt. Vertical padding only — the horizontal rhythm is unchanged. */
.breadcrumb a { display: inline-block; padding: 4px 0; min-height: 24px; }

/* ==========================================================================
   SITE FOOTER
   Four columns on desktop, two at tablet, one on phones. The measured footer
   ground is #F3F7FE with #252525 text; headings take the ink colour so the
   footer reads as part of the same system as the header (#E8F0FF).
   ========================================================================== */
.site-footer { margin-top: 20px; }

.footer-main { background: var(--footer-bg); border-top: 1px solid var(--rule); }

.footer-grid {
  display: grid;
  /* minmax(0,…) again: the recent-post titles are long and would otherwise push
     a track past its share and scroll the whole page sideways. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  padding: 38px 20px 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.footer-col { min-width: 0; }

.footer-brand {
  font-family: var(--font-brand);
  font-size: 27px;
  line-height: 1.15;
  color: var(--brand);
  display: inline-block;
}
.footer-brand:hover { color: var(--brand-dark); text-decoration: none; }
.footer-tagline { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); font-style: italic; }
.footer-about { margin: 12px 0 16px; font-size: 14px; line-height: 20px; color: var(--footer-ink); }

.footer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
  display: inline-block;
}

.footer-posts, .footer-tags, .social-links {
  list-style: none; margin: 0; padding: 0;
}

.footer-posts li { display: flex; gap: 10px; align-items: flex-start; }
.footer-posts li + li { margin-top: 14px; }
.footer-post__media { flex: 0 0 56px; }
.footer-post__media img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; display: block; }
.footer-post__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.footer-post__title { font-size: 13px; line-height: 17px; color: var(--ink); font-weight: 600; }
.footer-post__title:hover { color: var(--brand); text-decoration: none; }
.footer-post__body time { font-size: 11px; color: var(--ink-soft); }

.footer-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.footer-tags a {
  display: inline-block; font-size: 12.5px; line-height: 1;
  padding: 7px 11px; border-radius: 999px;
  background: #fff; border: 1px solid var(--rule); color: var(--ink);
}
.footer-tags a:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  /* 40px, comfortably clear of the 24x24 WCAG 2.5.8 AA floor. */
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1px solid var(--rule); color: var(--brand);
}
.social-links a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.social-links svg { width: 22px; height: 22px; display: block; }

.bottom-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 16px 20px;
  max-width: var(--container); margin: 0 auto;
  color: var(--footer-ink); font-size: 15px;
  border-top: 1px solid var(--rule);
}
.bottom-footer a { color: var(--brand); }
.copyright, .footer-credit { margin: 0; }
.footer-credit span { margin: 0 7px; color: var(--ink-soft); }

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
}

@media (max-width: 620px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 30px 14px 26px; }
  .footer-brand { font-size: 24px; }
  .bottom-footer { flex-direction: column; text-align: center; gap: 8px; font-size: 14px; padding: 16px 14px; }
}

/* ==========================================================================
   SIDEBAR — wisdomquotes4u.com parity
   ========================================================================== */

/* One card holding OUR action row and Facebook's frame, so the two read as a
   single widget rather than a heading with an embed stuck underneath. The border
   and radius live here; the frame inside carries neither. */
.fb-card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.fb-card-actions {
  display: flex; gap: 8px;
  padding: 8px 10px;
  background: var(--footer-bg);
  border-bottom: 1px solid var(--rule);
}
/* flex:1 1 0 so the ROW sets the width — Follow can never be pushed out by its
   own label length. */
.fb-card-btn {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--brand); border-radius: 6px;
  background: #fff; color: var(--brand);
  font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none;
}
.fb-card-btn:hover { background: var(--brand); color: #fff; text-decoration: none; }
.fb-card-btn-primary { background: var(--brand); color: #fff; }
.fb-card-btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
/* Square icon button beside Follow. flex:0 0 auto keeps it square instead of
   sharing the row; 36px clears the 24x24 WCAG 2.5.8 floor comfortably and matches
   the button beside it, so the pair reads as one control group. */
.fb-card-icon {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; min-height: 36px;
  border: 1px solid var(--brand); border-radius: 6px;
  background: #fff; color: var(--brand); text-decoration: none;
}
.fb-card-icon:hover { background: var(--brand); color: #fff; }
.fb-card-icon svg { display: block; }
.fb-embed-clip { max-width: 100%; overflow: hidden; line-height: 0; }
.fb-embed-frame { max-width: 100%; border: 0; display: block; }

/* The categories dropdown, replacing WordPress's "Select Category". */
.cat-select {
  width: 100%; max-width: 100%;
  padding: 10px 12px;
  font: inherit; font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule); border-radius: 4px;
  /* A native select ignores most styling on some platforms; keeping the arrow is
     the point — it is what makes it read as a dropdown. */
  min-height: 42px;
  cursor: pointer;
}
.cat-select:focus-visible { border-color: var(--brand); }

/* ==========================================================================
   COMMENTS — Comentario
   The widget renders in the LIGHT DOM (no shadow root), which is the only reason
   these rules can reach inside it. If a future version moves to shadow DOM these
   stop applying, and the sign-in bar reappearing is the symptom to watch for.
   ========================================================================== */
.post-comments { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--rule); }
.comments__off { color: var(--ink-soft); font-size: 14px; }

/* min-height reserves space because the widget is client-rendered; without it the
   section jumps from zero height to the full thread on every post page. */
.post-comments comentario-comments {
  display: block; min-height: 140px; border: 0; background: none; padding: 0;
}

/* HIDE THE SIGN-IN BAR — a dead control on this domain, which runs
   auth_anonymous=1 with auth_local and every federated provider OFF, so the button
   opens a dialogue offering nothing.
   TARGETING .comentario-profile-bar, NOT .comentario-btn-primary: the SUBMIT
   button wears that same class, so hiding by button style would remove the one
   control that posts a comment. */
.post-comments .comentario-profile-bar { display: none !important; }

/* The visible outer box is the HOST, not the widget root: Comentario puts a border
   and a white fill on .comentario-add-comment-host and nests the real placeholder
   inside it, so stripping the root alone still leaves a visible frame. */
.post-comments .comentario-add-comment-host { border: 0 !important; background: none !important; padding: 0 !important; }

/* The host is display:flex, so the placeholder shrink-wraps its own text and comes
   out ~198px wide in a 694px column. flex-basis is what fixes that; width alone
   loses to flex sizing. */
.post-comments .comentario-add-comment-placeholder {
  flex: 1 1 100%; width: 100%; box-sizing: border-box;
  border: 1px solid var(--rule) !important; border-radius: 6px;
  background: #fff; padding: 14px 16px; min-height: 84px; cursor: text;
}
.post-comments .comentario-add-comment-placeholder:hover { border-color: var(--brand) !important; }

/* "Powered by" removed. Checked against the licence first: Comentario is MIT, the
   obligation is to keep the copyright notice in copies of the SOURCE (the container
   runs the unmodified official image), and MIT does not require a visible badge in
   a deployed UI. No supported config toggle exists, so CSS is the only route. */
.post-comments .comentario-footer { display: none !important; }

/* RSS button removed by targeting the WRAPPER: .comentario-thread-buttons holds
   exactly that one child. The sibling .comentario-sort-buttons holds
   Votes/Oldest/Newest and is untouched, so sorting still works. Hiding by
   .comentario-btn-link would have taken those too. */
.post-comments .comentario-thread-buttons { display: none !important; }

/* The footer "Explore" links measured 6 sub-24px tap targets on every page at
   every width — exactly the 6 navigation items. WCAG 2.5.8 AA exempts links set
   inline INSIDE a sentence; a footer nav list is standalone navigation and is not
   exempt. Vertical padding only, so the column rhythm is unchanged.
   The footer-credit links (Privacy/Contact/RSS) get the same treatment. */
.footer-credit a { display: inline-block; padding: 3px 0; min-height: 24px; }

/* --- subscribe widget (wisdomquotes4u.com parity) -------------------------- */
.side-sub-intro { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--ink); }
.side-sub-form { margin: 0; }
.side-sub-input {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 11px 12px; margin-bottom: 10px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 4px;
  min-height: 44px;
}
.side-sub-input:focus-visible { border-color: var(--brand); }

/* The honeypot is moved OFF-SCREEN rather than display:none — some bots skip
   genuinely hidden fields, and this one exists to be filled in. */
.side-sub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* flex: 1 1 0 so the ROW decides the widths: "Unsubscribe" is half again as long
   as "Subscribe" and would otherwise take a wider button than the primary action. */
.side-sub-actions { display: flex; gap: 8px; }
.side-sub-btn {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 10px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand); border-radius: 4px; cursor: pointer;
}
.side-sub-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
/* Subscribe is the action being asked for, so it carries the fill and Unsubscribe
   is the outline — the same primary/secondary pairing as the fb-card buttons, so
   the two widgets teach one visual language rather than two. */
.side-sub-btn-secondary { background: #fff; color: var(--brand); }
.side-sub-btn-secondary:hover { background: var(--brand); color: #fff; }
.side-sub-btn[disabled] { opacity: .6; cursor: default; }

.side-sub-msg { margin: 10px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-soft); min-height: 1px; }
.side-sub-form.is-error .side-sub-msg { color: #b3261e; }
.side-sub-form.is-success .side-sub-msg { color: #1b6e2f; }

@media (max-width: 400px) {
  /* Two 14px labels cannot sit side by side in a 300px column without the longer
     one wrapping mid-word; stack them instead. */
  .side-sub-actions { flex-direction: column; }
}

/* ==========================================================================
   MOBILE OPTIMISATION PASS (2026-08-11)
   Everything here was driven by MEASURED values at 320/360/390/412, not by
   eyeballing a scaled-down screenshot. Desktop and tablet are deliberately
   untouched except for the one card-image fix below, which corrects a real
   content defect at every width.
   ========================================================================== */

/* --- 1. THE CARD IMAGE WAS CROPPING THE CONTENT ---------------------------
   `aspect-ratio: 16/9` + `object-fit: cover` crops every listing thumbnail. On
   this site the featured image IS the post — they are quote GRAPHICS with the
   words inside the picture — so cropping silently cut the quote in half. Measured
   at 390px: a 366px card showed roughly the middle two thirds of each graphic.
   `contain` on a slightly taller box shows the whole image; the tinted ground
   fills whatever letterboxing that leaves, so cards keep one height per row.
   This applies at ALL widths on purpose: the crop was wrong on desktop too. */
/* 16:10, MEASURED against the real library: all 125 featured images are 700px
   wide with heights 387-500, clustering at 438-450 — a ratio of ~1.55-1.6. 16/9
   (1.78) was cropping the taller two thirds of them; 4/3 (1.33) letterboxed every
   one and added ~56px of dead height per card on a phone. 16/10 is the content.'s
   own shape, so contain fits almost every image edge to edge with no crop. */
.loop-card__media { aspect-ratio: 16 / 10; background: var(--header-bg); }
.loop-card__media img { object-fit: contain; }

@media (max-width: 620px) {
  /* --- 2. LINE HEIGHT — the biggest readability win on a phone ------------
     The design's 16px/20px (1.25) is genuinely what the WordPress site used and
     is right on a 694px desktop column, but at 366px a line holds ~45 characters
     and 1.25 leading makes the paragraph a solid block. 1.6 is the standard for
     body copy at this measure. Desktop keeps 20px exactly. */
  body { line-height: 1.6; }
  .post-content { font-size: 16px; line-height: 1.65; }
  .post-content > * + * { margin-top: 16px; }
  .post-content p { margin-bottom: 16px; }
  .post-content li { margin-bottom: 6px; line-height: 1.6; }
  .post-content h2 { font-size: 20px; line-height: 1.35; margin: 24px 0 10px; }
  .post-content h3 { font-size: 18px; line-height: 1.35; margin: 22px 0 10px; }
  .post-content h4 { font-size: 17px; line-height: 1.4; }
  .home-content { line-height: 1.65; }

  /* --- 3. GUTTER — 12px was measured; it reads cramped against the edge ---
     16px is the smallest that stops text touching the bezel on a 360-412px
     phone. Anything wider starts to cost real measure at 320px, which is why
     320-360 keeps a tighter value further down. */
  .wrap { padding-left: 16px; padding-right: 16px; }

  /* --- 4. TITLES — 21px measured; slightly small for a page heading ------- */
  .single__title, .page-head__title { font-size: 24px; line-height: 1.28; }
  .section-title { font-size: 19px; margin: 26px 0 14px; }
  .page-head { padding: 20px 0 14px; margin-bottom: 18px; }

  /* --- 5. CARDS — measured 296x442 at 320px, i.e. a full screen per card ---
     The excerpt is the height. Trimming its leading and the body padding, and
     letting the title breathe, brings a card back to roughly two-thirds of a
     viewport so more than one is visible at a time. */
  .loop--grid { gap: 16px; }
  .loop-card__body { padding: 14px; }
  .loop-card__title { font-size: 16.5px; line-height: 1.3; margin-bottom: 6px; }
  .loop-card__meta { font-size: 12px; margin-bottom: 8px; gap: 4px 10px; }
  .loop-card__excerpt { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }

  /* --- 6. EXCESSIVE GAPS — measured 34px after the grid, 24px after the ad - */
  .single__meta { padding: 10px 0; margin-bottom: 16px; }
  .single__media { margin-bottom: 16px; }
  .ad-slot { margin: 16px 0; }
  .breadcrumb { padding: 14px 0 8px; }
  .single__tags { margin-top: 18px; }
  .post-comments, .related { margin-top: 26px; }

  /* --- 7. SIDEBAR + FOOTER spacing ---------------------------------------- */
  .sidebar { padding-top: 4px; }
  .widget { margin-bottom: 26px; }
  .widget-title { font-size: 18px; margin-bottom: 10px; }
  .footer-grid { padding: 26px 16px 22px; gap: 22px; }
  .footer-title { font-size: 15px; margin-bottom: 10px; }
  .footer-about { font-size: 13.5px; line-height: 19px; margin: 10px 0 14px; }
  .bottom-footer { padding: 14px 16px; }

  /* --- 8. HEADER — the wordmark jumped 30px -> 38px across the 400px line -- */
  .header-inner { padding: 14px 16px; }
  .brand-text { font-size: 32px; }
  .site-tagline { font-size: 12.5px; }
}

@media (max-width: 400px) {
  /* The 400px block previously set the brand to 30px while the 620px block set
     38px, so a 412px phone rendered a wordmark a quarter larger than a 390px one.
     The step is now 32 -> 29 -> 26, which reads as one continuous ramp. */
  .brand-text { font-size: 29px; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  .single__title, .page-head__title { font-size: 22px; }
  .footer-grid { padding: 22px 14px 20px; }
  .bottom-footer { padding: 14px; }
}

@media (max-width: 340px) {
  /* 320px is the floor. Measure, not taste: at 320 the card is 296px wide and a
     16px gutter each side leaves 288px of measure, which is about 40 characters
     — the minimum that still reads as prose rather than a column of fragments. */
  .brand-text { font-size: 26px; }
  .wrap { padding-left: 12px; padding-right: 12px; }
  .single__title, .page-head__title { font-size: 21px; }
  .post-content { font-size: 15.5px; }
  .loop-card__body { padding: 12px; }
}
