/* =====================================================================
   Naija Sports — 04 article page, comments, author, search, 403/404
   ===================================================================== */

/* --------------------------------------------------------------- *
   1. Article page
   --------------------------------------------------------------- */
.article-header { margin-bottom: 26px; }
.article-header h1 { margin: 14px 0 14px; line-height: 1.16; }
.article-lede {
  font-size: 1.08rem; line-height: 1.7; color: var(--ink-2);
  padding: 16px 20px; background: var(--surface); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.byline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.byline .avatar { width: 42px; height: 42px; font-size: 1rem; }
.byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.byline-name { font-family: var(--font); font-weight: 700; font-size: .93rem; color: var(--ink); }
.byline-role { font-size: .8rem; color: var(--muted); }
.byline-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.byline-stat {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font);
  font-weight: 600; font-size: .82rem; color: var(--muted);
}
.byline-stat svg { width: 15px; height: 15px; fill: currentColor; }

.article-cover { margin-bottom: 26px; }
.article-cover img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.article-cover figcaption {
  font-size: .82rem; color: var(--muted); margin-top: 9px; text-align: center;
  font-style: italic;
}

.article-body { font-size: 1.06rem; line-height: 1.85; color: var(--ink-2); }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.25rem; }
.article-body h2 {
  font-size: 1.55rem; margin: 2.1rem 0 .85rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--line); position: relative;
}
.article-body h2::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 54px; height: 2px; background: var(--accent); border-radius: 2px;
}
.article-body h3 { font-size: 1.24rem; margin: 1.7rem 0 .7rem; }
.article-body h4 { font-size: 1.08rem; margin: 1.4rem 0 .6rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: .5rem; }
.article-body li::marker { color: var(--accent); }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body img { border-radius: var(--radius); margin: 1.4rem 0; }
.article-body blockquote {
  margin: 1.8rem 0; padding: 20px 24px; background: var(--accent-soft);
  border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font); font-weight: 600; font-size: 1.1rem;
  color: var(--ink); line-height: 1.6;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body figure { margin: 1.6rem 0; }
.article-body figcaption { font-size: .84rem; color: var(--muted); text-align: center; margin-top: 8px; font-style: italic; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .92rem; }
.article-body th, .article-body td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.article-body th { background: var(--surface-2); font-family: var(--font); font-weight: 700; color: var(--ink); }
.article-body tbody tr:nth-child(even) { background: var(--surface-2); }
.article-body pre {
  background: var(--ink); color: #e6edf3; padding: 18px 20px; border-radius: var(--radius);
  overflow-x: auto; font-size: .86rem; line-height: 1.6;
}
.article-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.article-body pre code { background: none; padding: 0; }
.article-body hr { margin: 2.2rem 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 0; list-style: none; padding: 0; }
.tag-list a {
  font-family: var(--font); font-weight: 600; font-size: .82rem;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); padding: 6px 14px; border-radius: 999px;
}
.tag-list a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

.share-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 0; margin-top: 26px; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.share-bar .share-label {
  font-family: var(--font); font-weight: 700; font-size: .88rem; color: var(--ink);
}
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: all .2s ease;
}
.share-btn:hover { transform: translateY(-2px); color: #fff; }
.share-btn svg { width: 15px; height: 15px; fill: currentColor; }
.share-btn.fb:hover    { background: #1877f2; border-color: #1877f2; }
.share-btn.x:hover     { background: #000; border-color: #000; }
.share-btn.wa:hover    { background: #25d366; border-color: #25d366; }
.share-btn.tg:hover    { background: #26a5e4; border-color: #26a5e4; }
.share-btn.copy:hover { background: var(--accent); border-color: var(--accent); }
.share-btn.copy.copied { background: var(--accent); border-color: var(--accent); color: #fff; }

/* author box */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; margin: 30px 0;
  box-shadow: var(--shadow-sm);
}
.author-box .avatar { width: 66px; height: 66px; font-size: 1.5rem; }
.author-box h3 { margin: 0 0 3px; font-size: 1.1rem; }
.author-box .role { font-family: var(--font); font-weight: 600; font-size: .84rem; color: var(--accent-dark); margin-bottom: 9px; }
.author-box p { margin: 0 0 12px; font-size: .9rem; color: var(--muted); }
.author-box .author-social { display: flex; gap: 8px; }
.author-box .author-social a {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.author-box .author-social a:hover { background: var(--accent); color: #fff; }
.author-box .author-social svg { width: 14px; height: 14px; fill: currentColor; }

/* related stories at the foot of the article */
.related-posts { margin-top: 44px; }
.related-posts .section-head h2 { font-size: 1.25rem; }

/* --------------------------------------------------------------- *
   2. Comments
   --------------------------------------------------------------- */
.comments { margin-top: 40px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment {
  display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.comment:last-child { border-bottom: 0; }
.comment .avatar { width: 44px; height: 44px; font-size: 1rem; }
.comment-main { flex: 1; min-width: 0; }
.comment-head {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 6px;
}
.comment-author { font-family: var(--font); font-weight: 700; font-size: .95rem; color: var(--ink); }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-body { margin: 0; font-size: .95rem; line-height: 1.7; }
.comment-actions { margin-top: 8px; display: flex; gap: 12px; }
.comment-actions button {
  border: 0; background: none; cursor: pointer; padding: 0;
  font-family: var(--font); font-weight: 700; font-size: .82rem; color: var(--muted);
}
.comment-actions button:hover { color: var(--accent-dark); }
.comment-form { margin-top: 26px; }
.comment-form .form-actions { border-top: 0; padding-top: 6px; }

/* threaded replies */
.comment-reply-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font); font-weight: 700; font-size: .78rem; color: var(--muted);
}
.comment-reply-link:hover { color: var(--accent-dark); }
.comment-reply-link svg { width: 12px; height: 12px; fill: currentColor; }
.comment-replies {
  margin: 14px 0 0 22px; padding-left: 18px;
  border-left: 2px solid var(--line);
}
.comment-replies .comment + .comment { margin-top: 14px; }
.comment-replying {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 9px 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: .86rem; color: var(--ink);
}
.comment-replying strong { color: var(--accent-dark); }
.comment-replying a { font-weight: 700; margin-left: auto; }
.comment-replying[hidden] { display: none; }

/* --------------------------------------------------------------- *
   3. Author page
   --------------------------------------------------------------- */
.author-hero {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.author-hero .avatar { width: 96px; height: 96px; font-size: 2.2rem; }
.author-hero-info { flex: 1; min-width: 240px; }
.author-hero h1 { margin: 0 0 4px; font-size: 1.7rem; }
.author-hero .role { font-family: var(--font); font-weight: 700; color: var(--accent-dark); font-size: .9rem; margin-bottom: 10px; }
.author-hero p { margin: 0 0 12px; color: var(--muted); font-size: .93rem; }
.author-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.author-stats .stat { display: flex; flex-direction: column; }
.author-stats .stat-num {
  font-family: var(--font); font-weight: 700; font-size: 1.4rem; color: var(--ink); line-height: 1.1;
}
.author-stats .stat-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font); font-weight: 600; }
.author-hero .author-social { display: flex; gap: 10px; }
.author-hero .author-social a {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
  transition: background .2s, color .2s;
}
.author-hero .author-social a:hover { background: var(--accent); color: #fff; }
.author-hero .author-social svg { width: 15px; height: 15px; fill: currentColor; }

/* --------------------------------------------------------------- *
   4. Search page
   --------------------------------------------------------------- */
.search-hero {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 30px; box-shadow: var(--shadow-sm); margin-bottom: 28px;
}
.search-hero h1 { margin: 0 0 6px; }
.search-hero p { color: var(--muted); margin: 0 0 18px; }
.search-hero .searchbox input { width: 100%; }
.search-hero .searchbox input:focus { width: 100%; }
.search-hero .searchbox button { right: 8px; }
.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.popular-tags a {
  font-family: var(--font); font-weight: 600; font-size: .84rem;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; color: var(--ink-2);
}
.popular-tags a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.result-count { font-family: var(--font); font-weight: 600; color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.result-count strong { color: var(--ink); }
mark { background: #fff0a8; color: inherit; padding: 1px 3px; border-radius: 3px; }
[data-theme="dark"] mark { background: rgba(250,191,97,.28); color: #fff; }

/* --------------------------------------------------------------- *
   5. Error pages
   --------------------------------------------------------------- */
.error-page {
  text-align: center; padding: 80px 20px 100px;
}
.error-code {
  font-family: var(--font); font-weight: 700; font-size: clamp(4.5rem, 14vw, 8rem);
  line-height: 1; color: var(--accent); opacity: .18; margin: 0 0 -30px;
}
.error-page h1 { margin: 0 0 10px; }
.error-page p { color: var(--muted); max-width: 46ch; margin: 0 auto 26px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-box {
  max-width: 560px; margin: 0 auto; text-align: left;
}
.error-box .icon-wrap {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center;
  background: var(--accent-soft); margin-bottom: 20px;
}
.error-box .icon-wrap svg { width: 30px; height: 30px; fill: var(--accent-dark); }

/* --------------------------------------------------------------- *
   6. Utilities
   --------------------------------------------------------------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.gap-20 { gap: 20px; }
.wrap-flex { flex-wrap: wrap; }
.grow { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
