/* ==========================================================================
   SourceForge Articles: single post redesign (sftheme)
   Clean, single-column reading layout.
   Scoped to single posts only (body.single-post) so archive and other
   two-column pages are unaffected.

   Pairs with the template changes in README.md:
     1. single.php: no sidebar; title + byline above the featured image
     2. single.php: the_tags() markup for tag chips
     3. single.php: previous/next links as cards
   ========================================================================== */

:root {
  --sfa-text: #111;
  --sfa-body: #222;
  --sfa-muted: #666;
  --sfa-border: #e3e3e3;
  --sfa-accent: #ff6600;        /* SourceForge orange */
  --sfa-accent-tint: #fff4ec;
  --sfa-chip-bg: #f6f6f6;
  --sfa-chip-border: #dcdcdc;
  --sfa-font: Lato, sans-serif; /* already loaded by sftheme (400, 700) */
  --sfa-wide: 900px;            /* title block + hero image */
  --sfa-read: 720px;            /* article text column */
}

/* --- Remove page chrome on single posts -------------------------------- */
/* Remove the sidebar in the template too (README step 1); this is a fallback. */
.single-post .l-side-column,
.single-post .l-gutter,
.single-post .blog-header .backdrop,
.single-post .blog-header .breadcrumbs,
.single-post .cat-nav-wrapper,
.single-post .closed-comments,
.single-post .postmetadata .comments-link { display: none !important; }

/* --- Full-width single column ------------------------------------------ */
.single-post .l-two-column-page {
  display: block;
  max-width: none;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}
.single-post .l-content-column {
  float: none;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}
.single-post .blog-body,
.single-post .blog-body .main-content,
.single-post .blog-body .row,
.single-post .blog-body .columns {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

/* --- Article ------------------------------------------------------------ */
.single-post .blog-body article {
  width: 100%;
  padding: 56px 0 64px;
  background: #fff;
  border: 0;
  box-shadow: none;
  font-family: var(--sfa-font);
  color: var(--sfa-text);
}

/* Title block: title, then byline, then hero (order set in single.php) */
.single-post .blog-body article > h1 {
  max-width: var(--sfa-wide);
  margin: 0 auto 24px;
  padding: 0;
  border: 0;
  font-family: var(--sfa-font);
  font-size: 50px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--sfa-text);
}
.single-post .blog-body article > .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--sfa-wide);
  margin: 0 auto 32px;
  padding: 0;
  border: 0;
  font-size: 14px;
  color: #444;
}
.single-post .blog-body article > .meta .author-image img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.single-post .blog-body article > .meta time::before {
  content: "/";
  margin: 0 8px 0 2px;
  color: #999;
}
.single-post .blog-body article > .single-image {
  max-width: var(--sfa-wide);
  margin: 0 auto 56px;
}
.single-post .blog-body article > .single-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 4px;
}

/* --- Body copy ---------------------------------------------------------- */
.single-post .blog-body article .entry {
  max-width: var(--sfa-read);
  margin: 0 auto;
  padding: 0;
  font-family: var(--sfa-font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--sfa-body);
}
.single-post .blog-body article .entry > hr:first-child { display: none; }
.single-post .blog-body article .entry p,
.single-post .blog-body article .entry li {
  font-family: inherit;
  font-size: 18px;
  line-height: 1.6;
  color: var(--sfa-body);
}
.single-post .blog-body article .entry p { margin: 0 0 26px; }
.single-post .blog-body article .entry ul,
.single-post .blog-body article .entry ol { margin: 0 0 26px 1.2em; }
.single-post .blog-body article .entry li { margin-bottom: 8px; }

.single-post .blog-body article .entry h2,
.single-post .blog-body article .entry h3 {
  margin: 48px 0 16px;
  font-family: var(--sfa-font);
  font-size: 38px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--sfa-text);
  scroll-margin-top: 96px;
}
.single-post .blog-body article .entry h2 strong,
.single-post .blog-body article .entry h3 strong { font-weight: inherit; }
.single-post .blog-body article .entry h4 {
  margin: 32px 0 12px;
  font-family: var(--sfa-font);
  font-size: 24px;
  font-weight: 700;
}
.single-post .blog-body article .entry a {
  color: var(--sfa-accent);
  font-weight: 700;
  text-decoration: none;
}
.single-post .blog-body article .entry a:hover { text-decoration: underline; }
.single-post .blog-body article .entry img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.single-post .blog-body article .entry blockquote {
  margin: 0 0 26px;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--sfa-accent);
  font-size: 20px;
  color: #333;
}

/* --- Tags as pill chips (markup from README step 2) --------------------- */
.single-post .blog-body article .postmetadata {
  max-width: var(--sfa-read);
  margin: 48px auto 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--sfa-border);
  font-family: var(--sfa-font);
}
.single-post .sfa-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0;
  font-size: 14px;
}
.single-post .sfa-tags-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sfa-muted);
}
.single-post .sfa-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.single-post .sfa-tags-list a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--sfa-chip-border);
  border-radius: 999px;
  background: var(--sfa-chip-bg);
  color: var(--sfa-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.single-post .sfa-tags-list a:hover {
  background: var(--sfa-accent-tint);
  border-color: var(--sfa-accent);
  color: var(--sfa-accent);
}

/* --- Previous / next article cards (markup from README step 3) ---------- */
.single-post .blog-body .nav-post {
  max-width: var(--sfa-read);
  margin: 32px auto 72px;
  padding: 0;
}
.single-post .blog-body .nav-post .columns {
  display: flex;
  gap: 16px;
}
.single-post .blog-body .nav-post .nav-prev,
.single-post .blog-body .nav-post .nav-next {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  float: none;
}
.single-post .blog-body .nav-post .nav-next { text-align: right; }
.single-post .nav-post .nav-prev a,
.single-post .nav-post .nav-next a {
  display: block;
  padding: 20px 24px;
  border: 1px solid var(--sfa-border);
  border-radius: 10px;
  background: #fff;
  font-family: var(--sfa-font);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.single-post .nav-post .nav-prev a:hover,
.single-post .nav-post .nav-next a:hover {
  border-color: var(--sfa-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
  transform: translateY(-1px);
}
.single-post .sfa-nav-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sfa-accent);
}
.single-post .sfa-nav-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sfa-text);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .single-post .blog-body article { padding-top: 32px; }
  .single-post .blog-body article > h1 { font-size: 34px; }
  .single-post .blog-body article .entry h2,
  .single-post .blog-body article .entry h3 { font-size: 28px; }
}
@media (max-width: 600px) {
  .single-post .blog-body .nav-post .columns { flex-direction: column; }
  .single-post .blog-body .nav-post .nav-next { text-align: left; }
}
