/**
 * iPin Modern — Single / Page Layout
 * Post wrapper, meta, content, sidebar, comments, footer, scroll-to-top.
 */

/* =========================================================
   CONTENT AREA GRID
   ========================================================= */
.content-area {
  max-width: var(--max-content);
  margin: 32px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}

.content-area.full-width {
  grid-template-columns: 1fr;
  max-width: var(--max-single);
}

.content-area.left-sidebar {
  grid-template-columns: 260px 1fr;
}

/* =========================================================
   POST WRAPPER
   ========================================================= */
.post-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur);
  /* Grid child: without min-width:0 a grid track cannot shrink
     below the content's min-content size, which causes the column
     to overflow its declared 1fr track on narrow viewports.       */
  min-width: 0;
}

/* ── Code blocks: preserve formatting but allow horizontal scroll
   rather than blowing out the post column.
   pre > code inherits the pre rule; standalone inline code wraps. ── */
.post-wrapper .post-content pre {
  overflow-x: auto;
  max-width: 100%;
  white-space: pre;
  -webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
}

.post-wrapper .post-content code {
  white-space: pre-wrap;
  word-break: break-all;
}

/* Code inside a pre block: preserve exact whitespace, let the pre scroll */
.post-wrapper .post-content pre > code {
  white-space: pre;
  word-break: normal;
}

/* ── Tables: display:block + overflow-x:auto is the safest CSS-only
   approach for responsive tables. It preserves td/th layout while
   allowing horizontal scroll on narrow viewports without a JS wrapper. ── */
.post-wrapper .post-content table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-collapse: collapse;
}

/* Title bar */
.post-wrapper .h1-wrapper {
  border-bottom: 1px solid var(--border);
  padding: 26px 28px 22px;
  background: var(--grad-hero-overlay);
}

.post-wrapper .h1-wrapper h1 {
  font-size: clamp(1.2rem, 2.5vw, 1.85rem);
  text-align: center;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.25;
}

/* Meta strip */
.post-wrapper .post-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 28px;
  font-size: .8rem;
  color: var(--txt-muted);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 6px;
  background: var(--grad-hero-overlay);
}

.post-meta-top__left,
.post-meta-top__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.post-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 600;
  color: var(--txt-secondary);
  white-space: nowrap;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}

.post-meta-chip i {
  font-size: .7rem;
  opacity: .7;
}

.post-meta-chip--muted {
  opacity: .7;
}

.post-meta-chip--link {
  text-decoration: none;
  cursor: pointer;
}

.post-meta-chip--link:hover {
  background: var(--grad-brand-btn);
  color: #fff;
  border-color: transparent;
}

.post-meta-chip--link:hover i { opacity: 1; }

.post-wrapper .post-meta-top a { color: var(--txt-secondary); text-decoration: none; }
.post-wrapper .post-meta-top a:hover { color: var(--clr-accent-1); }

/* Content body */
.post-wrapper .post-content {
  padding: 28px;
  color: var(--txt-primary);
  font-size: .96rem;
  line-height: 1.78;
  /* Prevent long unbreakable strings (URLs, slugs) from overflowing
     the post column on narrow viewports. overflow-wrap handles most
     cases; word-break is the fallback for browsers that need it.   */
  overflow-wrap: break-word;
  word-break: break-word;
}

.post-wrapper .post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 14px 0;
}

.post-wrapper .post-content h2,
.post-wrapper .post-content h3,
.post-wrapper .post-content h4 {
  margin: 26px 0 10px;
}

.post-wrapper .post-content p          { margin-bottom: 16px; }
.post-wrapper .post-content ul,
.post-wrapper .post-content ol         { margin: 0 0 16px 24px; }
.post-wrapper .post-content blockquote {
  border-left: 3px solid var(--clr-accent-2);
  margin: 16px 0;
  padding: 8px 20px;
  color: var(--txt-secondary);
  font-style: italic;
}

.post-wrapper .post-content a {
  color: var(--clr-accent-1);
  text-decoration: underline;
  text-decoration-color: rgba(255,60,172,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur);
}

.post-wrapper .post-content a:hover {
  text-decoration-color: var(--clr-accent-1);
}

/* Categories / Tags / Published strip */
.post-meta-category-tag {
  padding: 14px 28px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--txt-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  background: var(--grad-hero-overlay);
}

.pmc-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pmc-item i {
  font-size: .78rem;
  color: var(--clr-accent-1);
  opacity: .75;
  flex-shrink: 0;
}

.pmc-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--txt-muted);
}

.pmc-divider {
  display: block;
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

.post-meta-category-tag a {
  display: inline-block;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--txt-secondary);
  text-decoration: none;
  transition:
    background    var(--dur),
    color         var(--dur),
    border-color  var(--dur);
}

.post-meta-category-tag a:hover {
  background: var(--grad-brand-btn);
  color: #fff;
  border-color: transparent;
}


/* Post navigation */
.sidebar {
  color: var(--txt-secondary);
  font-size: .88rem;
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.sidebar h4 {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--txt-muted);
  padding: 0 0 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 10px;
}

.sidebar > .widget {
  margin-bottom: 28px;
}

.sidebar ul {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sidebar ul li {
  border-bottom: 1px solid var(--border);
}

.sidebar ul li:last-child { border-bottom: none; }

.sidebar ul li a {
  display: block;
  padding: 9px 14px;
  font-size: .85rem;
  color: var(--txt-secondary);
  transition:
    background    var(--dur),
    color         var(--dur),
    padding-left  var(--dur);
}

.sidebar ul li a:hover {
  background: var(--grad-card-hover);
  color: var(--clr-accent-1);
  padding-left: 20px;
}

/* =========================================================
   POST NAVIGATION
   ========================================================= */
.post-nav {
  padding: 20px 28px 24px;
}

.post-nav__pager {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.post-nav__pager a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .83rem;
  font-weight: 600;
  color: var(--txt-secondary);
  text-decoration: none;
  transition:
    background    var(--dur),
    color         var(--dur),
    border-color  var(--dur),
    transform     var(--dur);
}

.post-nav__pager a:hover {
  background: var(--grad-brand-btn);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.post-nav__pager .next { margin-left: auto; }


/* =========================================================
   COMMENTS SECTION
   ========================================================= */
#comments {
  padding: 0 28px 32px;
}

/* Wrapper inside .post-wrapper that provides horizontal padding.
   content-visibility:auto skips rendering off-screen comment threads
   until the user scrolls near them — reduces main-thread work on
   posts with many comments, improving INP on interaction. */
.post-comments {
  padding: 0 28px 32px;
  content-visibility: auto;
  /* contain-intrinsic-size gives the browser a height estimate so the
     scrollbar doesn't jump when the section is rendered on scroll-in.
     400px is a conservative minimum; real content is typically taller. */
  contain-intrinsic-size: auto 400px;
}

.comments-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--txt-muted);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  margin: 0 0 18px;
}

/* ── Comment list ──────────────────────────────────────── */
.commentlist {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Each comment is a card */
li.ipin-comment {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  list-style: none;
  transition: border-color var(--dur), box-shadow var(--dur);
  position: relative;
}

li.ipin-comment:hover {
  border-color: rgba(var(--clr-accent-rgb, 255,60,172), .25);
  box-shadow: var(--shadow-sm);
}

/* Left accent bar on comments by post author */
li.ipin-comment.bypostauthor {
  border-left: 3px solid var(--clr-accent-1);
  padding-left: 15px;
}

/* ── Comment header row ─────────────────────────────────── */
.ipin-comment__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ipin-comment__avatar {
  flex-shrink: 0;
}

.ipin-comment__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border);
}

.ipin-comment__meta {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  color: var(--txt-muted);
  min-width: 0;
}

.ipin-comment__author {
  font-weight: 700;
  color: var(--txt-primary);
}

.ipin-comment__author a {
  color: var(--clr-accent-3);
  text-decoration: none;
}

.ipin-comment__author a:hover { color: var(--clr-accent-1); }

.ipin-comment__dot { opacity: .4; }

.ipin-comment__date { color: var(--txt-muted); }

.ipin-comment__permalink {
  color: var(--txt-muted);
  text-decoration: none;
  font-size: .78rem;
  opacity: .55;
  transition: opacity var(--dur);
}

.ipin-comment__permalink:hover { opacity: 1; }

/* Reply link — pushed to the far right of the header row */
.ipin-comment__reply {
  margin-left: auto;
  flex-shrink: 0;
}

.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: .74rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--txt-muted);
  text-decoration: none;
  transition:
    background   var(--dur),
    color        var(--dur),
    border-color var(--dur);
}

.comment-reply-link:hover {
  background: var(--clr-accent-1);
  color: #fff;
  border-color: var(--clr-accent-1);
}

/* ── Comment body ────────────────────────────────────────── */
.ipin-comment__body {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--txt-primary);
}

/* Indented when avatar is present — aligns with avatar right edge */
.ipin-comment__body--indented { padding-left: 50px; }

.ipin-comment__body p { margin: 0 0 10px; }
.ipin-comment__body p:last-child { margin-bottom: 0; }

.ipin-comment__moderation {
  font-size: .8rem;
  color: var(--txt-muted);
  font-style: italic;
  margin: 0 0 8px;
  padding-left: 50px;
}

/* Nested replies */
.commentlist ul.children {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* =========================================================
   COMMENT FORM
   ========================================================= */
.comment-respond {
  margin-top: 0;
  padding: 32px 28px 28px;
  background: transparent;
  border: none;
  border-radius: 0;
  border-top: 2px solid var(--border);
}

#reply-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.01em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 6px;
  line-height: 1.2;
  border: none;
  padding: 0;
  text-transform: none;
}

#reply-title a {
  font-size: .78rem;
  font-weight: 600;
  -webkit-text-fill-color: var(--clr-accent-3);
  color: var(--clr-accent-3);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 10px;
  background: none;
}

.comment-respond > p.comment-notes {
  font-size: .82rem;
  color: var(--txt-muted);
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Logged-in notice */
.comment-form .logged-in-as {
  font-size: .82rem;
  color: var(--txt-muted);
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.comment-form .logged-in-as a { color: var(--clr-accent-3); }

/* Comment textarea sits at the top */
#commentform > p.comment-form-comment {
  margin-bottom: 16px;
}

/* ── Name / Email / Website 3-column grid ──────────────── */
.comment-form-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

/* Each field wrapper — label + input stacked */
.comment-form-fields-grid > div,
#commentform > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#commentform > div:last-of-type {
  margin-bottom: 14px;
}

/* ── Shared label + input styles ────────────────────────── */
#commentform label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  color: var(--txt-secondary);
  letter-spacing: .03em;
  text-transform: uppercase;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--txt-primary);
  transition: border-color var(--dur), box-shadow var(--dur);
}

#commentform input[type="text"]:focus-visible,
#commentform input[type="email"]:focus-visible,
#commentform input[type="url"]:focus-visible,
#commentform textarea:focus-visible {
  outline: none;
  border-color: var(--clr-accent-1);
  box-shadow: var(--focus-ring);
}

#commentform textarea {
  resize: vertical;
  min-height: 140px;
  border-radius: var(--radius-md);
}

/* ── Cookie consent checkbox ────────────────────────────── */
.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: .82rem;
  color: var(--txt-muted);
}

.comment-form-cookies-consent input[type="checkbox"] {
  /* Hide browser default */
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  position: relative;
  transition: background var(--dur), border-color var(--dur);
}

.comment-form-cookies-consent input[type="checkbox"]:checked {
  background: var(--clr-accent-1);
  border-color: var(--clr-accent-1);
}

.comment-form-cookies-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.comment-form-cookies-consent input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.comment-form-cookies-consent label {
  font-size: .82rem;
  font-weight: 400;
  color: var(--txt-muted);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

/* ── Submit button ──────────────────────────────────────── */
.form-submit {
  margin: 0;
}

#commentform #submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 32px;
  background: var(--grad-brand-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .01em;
  transition:
    opacity   var(--dur),
    transform var(--dur) var(--ease);
}

#commentform #submit:hover {
  opacity: .88;
  transform: translateY(-2px) scale(1.03);
}

#commentform #submit:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .comment-form-fields-grid {
    grid-template-columns: 1fr;
  }

  .ipin-comment__body--indented,
  .ipin-comment__moderation {
    padding-left: 0;
  }

  .commentlist ul.children {
    margin-left: 16px;
  }
}

/* =========================================================
   STANDALONE SEARCH FORM, FOOTER, SCROLL-TO-TOP
   Moved to base.css in v4.3.5 — these elements appear on
   all page types so must load globally, not just on singles.
   ========================================================= */

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .content-area {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .content-area { padding: 0 14px; }

  .post-wrapper .post-content,
  .post-wrapper .h1-wrapper,
  .post-wrapper .post-meta-top,
  .post-meta-category-tag,
  .post-comments,
  .post-nav { padding-left: 18px; padding-right: 18px; }

  #commentform .comment-form-fields-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   SCROLL MARGIN — WCAG 2.4.11 Focus Not Obscured (Minimum)
   The fixed top nav (height: var(--nav-height)) would otherwise
   cover anchor targets and keyboard-focused headings when the
   browser scrolls them into view. scroll-margin-top pushes the
   snap point below the nav + a small breathing gap.
   Applied to: anchor target elements and key section headings.
   ========================================================= */
:target,
#main-content,
#comments,
.post-wrapper,
.article-archive,
.content-area {
  scroll-margin-top: calc(var(--nav-height, 60px) + 16px);
}

.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 14px 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--grad-hero-overlay);
}

.post-share__label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--txt-muted);
  margin-right: 4px;
  flex-shrink: 0;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: .68rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--dur-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn-share i {
  font-size: .8rem;
  flex-shrink: 0;
}

.btn-share__label { display: none; }

.btn-share {
  width: 32px;
  padding: 0;
  justify-content: center;
}

.btn-share:hover  { opacity: .75; }
.btn-share:active { opacity: .9; }

.btn-share:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-share--native    { background: var(--surface-alt); color: var(--txt-primary); border: 1px solid var(--border); }
.btn-share--whatsapp  { background: #25D366; color: #fff; }
.btn-share--telegram  { background: #2AABEE; color: #fff; }
.btn-share--facebook  { background: #1877F2; color: #fff; }
.btn-share--twitter   { background: #000;    color: #fff; }
.btn-share--threads   { background: #1c1c1c; color: #fff; }
.btn-share--mastodon  { background: #6364FF; color: #fff; }
.btn-share--pinterest { background: #E60023; color: #fff; }
.btn-share--email     { background: transparent; color: var(--txt-muted); border: 1px solid var(--border); }
.btn-share--copy      { background: transparent; color: var(--txt-muted); border: 1px solid var(--border); }

.btn-share--copy.copied {
  background: #007A53;
  color: #fff;
  border-color: transparent;
}

@media (max-width: 600px) {
  .post-share { padding: 12px 16px; gap: 5px; }
}


/* =========================================================
   SIDEBLOG ARCHIVE  (.article-archive, .article-list, .article-card)
   Used by archive-ipin_article.php
   ========================================================= */
.article-archive {
  min-width: 0; /* grid child — prevent overflow */
}

.article-archive__header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border);
}

.article-archive__title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-family: var(--font-display);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 6px;
}

.article-archive__desc {
  color: var(--txt-muted);
  font-size: .9rem;
  margin: 0;
}

/* List — semantic <ol> so article order is machine-readable */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Article card ───────────────────────────────── */
.article-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur), border-color var(--dur);
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--clr-accent-1);
}

/* Thumbnail column */
.article-card__thumb {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--grad-brand);
}

.article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform calc(var(--dur) * 1.5) var(--ease);
}

.article-card:hover .article-card__thumb img {
  transform: scale(1.05);
}

/* Body column */
.article-card__body {
  padding: 16px 20px 16px 0;
  min-width: 0;
}

.article-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
}

.article-card__title a {
  color: var(--txt-primary);
  text-decoration: none;
  transition: color var(--dur);
}

.article-card__title a:hover {
  color: var(--clr-accent-1);
}

.article-card__meta {
  font-size: .78rem;
  color: var(--txt-muted);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.article-card__meta time { color: var(--txt-muted); }
.article-card__tags      { color: var(--txt-muted); }
.article-card__tags a    { color: var(--clr-accent-3); }

.article-card__excerpt {
  font-size: .87rem;
  color: var(--txt-secondary);
  line-height: 1.6;
  margin: 0 0 10px;
  /* Clamp to 3 lines — webkit prefix for broad support, standard for spec compliance */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.article-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--clr-accent-1);
  text-decoration: none;
  transition: gap var(--dur);
}

.article-card__cta:hover { gap: 8px; }

/* Cards without a thumbnail span the full width */
.article-card:not(:has(.article-card__thumb)) {
  grid-template-columns: 1fr;
}

.article-card:not(:has(.article-card__thumb)) .article-card__body {
  padding: 18px 20px;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 480px) {
  .article-card {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }

  .article-card__body {
    padding: 12px 14px 12px 0;
  }
}


/* =========================================================
   SINGLE ARTICLE  (.article-breadcrumb)
   Used by single-ipin_article.php
   ========================================================= */
.article-breadcrumb {
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.article-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--txt-muted);
}

.article-breadcrumb a {
  color: var(--clr-accent-3);
  text-decoration: none;
  transition: color var(--dur);
}

.article-breadcrumb a:hover { color: var(--clr-accent-1); }

.article-breadcrumb [aria-current="page"] {
  color: var(--txt-primary);
  font-weight: 600;
  /* Truncate long titles */
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   SIDEBLOG SHORTCODE WIDGET  (.ipin-sideblog-widget)
   Rendered by [ipin_sideblog] shortcode.
   Designed to sit naturally in a sidebar (.sidebar) or
   inside any page content column.
   ========================================================= */
.ipin-sideblog-widget {
  font-size: .88rem;
}

.ipin-sideblog-widget__title {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--txt-muted);
  padding: 0 0 8px;
  border-bottom: 2px solid var(--border);
  margin: 0 0 12px;
}

.ipin-sideblog-widget__list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ipin-sideblog-widget__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur);
}

.ipin-sideblog-widget__item:last-child { border-bottom: none; }
.ipin-sideblog-widget__item:hover { background: var(--grad-card-hover); }

.ipin-sideblog-widget__thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: block;
}

.ipin-sideblog-widget__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ipin-sideblog-widget__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ipin-sideblog-widget__link {
  font-size: .85rem;
  font-weight: 600;
  color: var(--txt-primary);
  text-decoration: none;
  line-height: 1.35;
  transition: color var(--dur);
  /* Clamp to 2 lines — webkit prefix for broad support, standard for spec compliance */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.ipin-sideblog-widget__link:hover { color: var(--clr-accent-1); }

.ipin-sideblog-widget__date {
  font-size: .73rem;
  color: var(--txt-muted);
}

.ipin-sideblog-widget__all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--clr-accent-1);
  text-decoration: none;
  transition: gap var(--dur);
}

.ipin-sideblog-widget__all:hover { gap: 8px; }
