/* article-public.css — /articles (listing) and /articles/{slug} (reading page). Builds on public-shell.css tokens. */

/* ================= LISTING PAGE: /articles ================= */

/* ---- Hero banner ---- */
.articles-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius-lg); padding: 22px 18px; margin: 8px 0 16px;
  color: #fff; box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
@media (min-width: 860px) {
  .articles-hero-banner { padding: 26px 32px; }
  .articles-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: center; }
}
.hero-badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-full); margin-bottom: 8px;
}
.articles-hero-title { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 800; line-height: 1.22; letter-spacing: -0.03em; margin-bottom: 6px; color: #fff; }
.articles-hero-title span.highlight-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.articles-hero-sub { font-size: 0.78rem; color: #cbd5e1; line-height: 1.45; margin-bottom: 14px; max-width: 500px; }

.articles-hero-banner .hero-search-box {
  display: flex; align-items: center; background: #ffffff;
  border-radius: var(--radius-full); padding: 4px 6px 4px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25); max-width: 460px; margin-bottom: 14px;
}
.articles-hero-banner .hero-search-box input { flex: 1; border: none; outline: none; font-size: 0.82rem; font-family: inherit; color: var(--text-main); background: transparent; }
.articles-hero-banner .hero-search-box button {
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.78rem;
  padding: 7px 16px; border-radius: var(--radius-full); transition: var(--transition);
}
.articles-hero-banner .hero-search-box button:hover { background: var(--primary-hover); }

.hero-featured-visual-card {
  display: block; position: relative; border-radius: var(--radius-md); overflow: hidden;
  height: 165px; border: 1.5px solid rgba(255, 255, 255, 0.15); background: #1e293b; margin-top: 12px;
}
@media (min-width: 860px) { .hero-featured-visual-card { margin-top: 0; height: 185px; } }
.hero-featured-visual-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.hero-visual-badge-top { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-full); }
.hero-visual-read-time {
  position: absolute; bottom: 10px; left: 10px; background: rgba(15,23,42,0.85); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-xs); display: flex; align-items: center; gap: 4px;
}

/* ---- Filter + sort toolbar ---- */
.filter-toolbar-box {
  background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 14px; margin-bottom: 12px; box-shadow: var(--shadow-subtle);
  display: flex; flex-direction: column; gap: 10px;
}
@media (min-width: 860px) { .filter-toolbar-box { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; } }

.topic-pills-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.topic-pills-scroll::-webkit-scrollbar { display: none; }
.topic-filter-btn {
  padding: 5px 12px; border-radius: var(--radius-full); font-size: 0.74rem; font-weight: 700;
  color: var(--text-muted); background: #f8fafc; border: 1px solid var(--border);
  white-space: nowrap; transition: var(--transition); display: inline-flex; align-items: center; gap: 5px;
}
.topic-filter-btn:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.topic-filter-btn.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.topic-filter-btn.active i { color: #fff !important; }
.topic-filter-btn .n { font-size: 0.66rem; opacity: 0.75; }

.sort-control-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; border-top: 1px solid var(--border-light); padding-top: 8px; }
@media (min-width: 860px) { .sort-control-group { border-top: none; padding-top: 0; } }
.sort-label-wrap { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }
.sort-select-dropdown {
  background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 5px 10px; font-size: 0.74rem; font-weight: 700; color: var(--text-main); font-family: inherit; outline: none; cursor: pointer; transition: var(--transition);
}
.sort-select-dropdown:focus { border-color: var(--primary); }
.sort-form { display: flex; align-items: center; gap: 8px; }

/* ---- Active filter chips (same idea as /workshops) ---- */
.active-filters-row { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-filters-row.filled { display: flex; }
.filter-chip-el {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); color: var(--primary);
  font-size: 0.74rem; font-weight: 700; padding: 5px 10px; border-radius: var(--radius-full);
}
.filter-chip-el a { color: var(--primary); font-weight: 800; }
.filter-chip-el.clear-all { background: #f1f5f9; color: var(--text-muted); }
.filter-chip-el.clear-all a { color: var(--text-muted); }
/* ---- Section header + results count (shared shape with /workshops) ---- */
.app-section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.app-section-header h2 { font-size: 1.05rem; font-weight: 800; color: #0f172a; letter-spacing: -0.02em; }
.article-counter-badge { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }

/* ---- 4-column articles grid ---- */
.articles-4col-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 20px; }
@media (min-width: 580px) { .articles-4col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .articles-4col-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .articles-4col-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.article-box-card.listing-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-subtle);
  transition: var(--transition); position: relative; height: 100%;
}
.article-box-card.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cbd5e1; }
.listing-card .article-thumb-cover { height: 130px; background: #1e293b; position: relative; overflow: hidden; flex-shrink: 0; }
.listing-card .article-thumb-cover img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .article-thumb-cover .ph-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 1.6rem; }
.listing-card .article-views-tag {
  position: absolute; top: 8px; right: 8px; background: rgba(15,23,42,0.75); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-full); display: flex; align-items: center; gap: 3px;
}
.listing-card .article-details { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.listing-card .article-cat-chip { font-size: 0.7rem; font-weight: 800; color: var(--primary); text-transform: uppercase; margin-bottom: 3px; }
.listing-card h3.art-title {
  font-size: 0.86rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card h3.art-title a { color: inherit; }
.listing-card h3.art-title a:hover { color: var(--primary); }
.listing-card p.art-desc {
  font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card .card-tags-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.listing-card .card-tag-pill { background: #f1f5f9; color: #475569; font-size: 0.7rem; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.listing-card .author-meta-row { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-light); }
.listing-card .author-avatar-chip { width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #475569; flex-shrink: 0; overflow: hidden; }
.listing-card .author-avatar-chip img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .author-meta-text { min-width: 0; flex: 1; }
.listing-card .author-meta-text h5 { font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0f172a; }
.listing-card .author-meta-text p { font-size: 0.7rem; color: var(--text-subtle); }
.listing-card:hover h5 { color: var(--primary); }

/* ---- Empty state ---- */
.empty-results-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 40px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 24px;
}
.empty-icon-circle { width: 54px; height: 54px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 10px; }
.empty-results-box h4 { font-size: 0.95rem; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.empty-results-box p { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 12px; }

/* ---- Pagination (server-rendered — same shape as /workshops) ---- */
.pagination-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 28px; padding-top: 14px; border-top: 1px solid var(--border); }
.page-num-btn {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: #fff; color: var(--text-main); font-size: 0.78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; transition: var(--transition);
}
.page-num-btn:hover:not(.disabled):not(.active) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.page-num-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-num-btn.disabled { opacity: 0.4; pointer-events: none; }
.page-arrow-btn { padding: 0 12px; }

/* ---- "Learn from Top Experts" ---- */
.trainers-section-card { background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 16px; margin: 8px 0 24px; box-shadow: var(--shadow-subtle); }
@media (min-width: 768px) { .trainers-section-card { padding: 22px; } }
.trainers-header-box { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.trainers-header-box h3 { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.trainers-header-box h3 span { color: var(--primary); }
.trainers-header-box p { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.trainers-header-stats { display: flex; gap: 8px; flex-shrink: 0; }
.header-mini-stat { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 4px 10px; text-align: center; }
.header-mini-stat strong { font-size: 0.85rem; font-weight: 800; color: #0f172a; display: block; }
.header-mini-stat span { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

.experts-4grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
@media (min-width: 580px) { .experts-4grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .experts-4grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Base trainer-card look (same design as the homepage's featured-trainer carousel card,
   which only exists inline in home.blade.php's <style> — repeated here so this page
   doesn't depend on that file). */
.pro-trainer-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: var(--shadow-subtle); transition: var(--transition);
  display: flex; flex-direction: column; height: 100%;
}
.pro-trainer-card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: var(--shadow-hover); }
.pro-card-header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.pro-avatar-box { position: relative; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.pro-avatar-box img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1.5px solid #e2e8f0; }
.pro-check-badge {
  position: absolute; bottom: -1px; right: -1px; background: #fff;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); overflow: hidden;
}
.pro-check-badge img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pro-meta-info { min-width: 0; }
.pro-meta-info h4 { font-size: 0.88rem; font-weight: 800; color: #0f172a; line-height: 1.2; }
.pro-meta-info p.role { font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; line-height: 1.25; }
.pro-location-text { font-size: 0.7rem; color: var(--text-subtle); margin: 3px 0 6px; display: flex; align-items: center; gap: 3px; }

.credibility-tag {
  display: inline-flex; align-items: center; gap: 4px; background: #f8fafc;
  border: 1px solid #e2e8f0; color: #334155; font-size: 0.66rem; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; margin-top: 4px;
}
.credibility-tag.blue { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.credibility-tag.green { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.credibility-tag.purple { background: #faf5ff; border-color: #e9d5ff; color: #7e22ce; }

.pro-topics-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.pro-topic-chip { background: #f1f5f9; color: #475569; font-size: 0.68rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; }

.pro-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-light); margin-top: auto; }
.pro-rating-box { font-size: 0.76rem; font-weight: 700; color: #0f172a; }
.pro-new-badge { font-size: 0.7rem; }
.btn-outline-blue { border: 1.5px solid var(--primary); color: var(--primary); background: #fff; padding: 5px 12px; font-size: 0.75rem; border-radius: var(--radius-xs); font-weight: 700; display: inline-block; white-space: nowrap; transition: var(--transition); }
.btn-outline-blue:hover { background: var(--primary-light); }

.center-load-link { text-align: center; margin-top: 12px; }
.center-load-link a { font-size: 0.8rem; font-weight: 700; color: var(--primary); }

/* ---- Trust value grid + newsletter (same content the homepage uses) ---- */
.features-5-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 20px 0 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.feature-point { display: flex; gap: 8px; align-items: center; background: #fff; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.feat-icon { font-size: 1.2rem; color: var(--primary); flex-shrink: 0; }
.feature-point h4 { font-size: 0.78rem; font-weight: 700; }
.feature-point p { font-size: 0.66rem; color: var(--text-muted); }

.newsletter-mini-bar { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius-lg); padding: 18px 16px; text-align: center; margin: 24px 0; }
.newsletter-mini-bar h4 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.newsletter-mini-bar p { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 12px; }
.newsletter-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 8px 12px; border-radius: var(--radius-md); border: 1px solid var(--border); font-size: 0.84rem; outline: none; background: #fff; }

/* ================= /articles/{slug} (reading page) ================= */

/* ---- Reading progress bar (fixed top strip) ---- */
.reading-progress-track { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 60; pointer-events: none; }
.reading-progress-track .bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), #818cf8); transition: width 0.1s linear; }

/* ---- Sticky mini header (appears once you scroll past the title) ---- */
.sticky-read-bar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 55; background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-subtle); transform: translateY(-100%); transition: transform 0.25s ease; padding: 8px 14px;
}
.sticky-read-bar.visible { transform: translateY(0); }
.sticky-read-bar-inner { max-width: 780px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.sticky-read-bar-inner h6 { font-size: 0.8rem; font-weight: 800; color: #0f172a; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-read-bar-inner .icon-btn { flex-shrink: 0; }

/* ---- Icon buttons (shared by share row, dock and mobile bar) ---- */
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem;
  transition: var(--transition); flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.icon-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.icon-btn.sm { width: 27px; height: 27px; font-size: 0.82rem; }

/* ---- Page shell: content column + fixed side dock on wide screens ---- */
.article-page { max-width: 780px; margin: 8px auto 20px; position: relative; }

.reading-side-dock {
  display: none;
}
@media (min-width: 1180px) {
  .reading-side-dock {
    display: flex; flex-direction: column; gap: 8px; position: fixed; left: calc(50% - 470px); top: 220px; z-index: 20;
  }
  .reading-side-dock .icon-btn { width: 38px; height: 38px; font-size: 1.05rem; box-shadow: var(--shadow-subtle); }
  .reading-side-dock .dock-count { font-size: 0.7rem; text-align: center; color: var(--text-subtle); font-weight: 700; }
}

/* ---- Mobile sticky action bar (bookmark / share / font / print) ---- */
.mobile-action-bar {
  position: fixed; bottom: 0; left: 0; width: 100%; z-index: 55; background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06); padding: 8px 14px; display: flex; align-items: center; justify-content: space-around;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
@media (min-width: 1180px) { .mobile-action-bar { display: none; } }

/* ---- Header ---- */
.article-head { margin: 8px 0 16px; }
.article-head-top-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.article-cat {
  display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-light); border-radius: 99px; padding: 4px 12px;
}
.article-cat.linkable:hover { background: var(--primary); color: #fff; }
.article-trending-badge {
  display: inline-flex; align-items: center; gap: 4px; background: #fef3c7; color: #b45309; font-size: 0.68rem;
  font-weight: 800; padding: 4px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.03em;
}
.article-head h1 { font-size: 1.55rem; line-height: 1.22; font-weight: 800; letter-spacing: -0.02em; color: var(--text-main); }
@media (min-width: 768px) { .article-head h1 { font-size: 2.15rem; } }

.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.article-author { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: inherit; }
.article-author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e2e8f0; flex-shrink: 0; }
.article-author strong { display: block; color: var(--text-main); font-size: 0.82rem; font-weight: 800; line-height: 1.2; }
.article-author small { display: block; font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }
a.article-author:hover strong { color: var(--primary); }
.article-dot { color: var(--text-subtle); }
.article-meta .stat-ico { display: inline-flex; align-items: center; gap: 3px; }

/* ---- Inline share row (always visible, works with zero JS) ---- */
.share-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.share-row .label { font-size: 0.7rem; font-weight: 700; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.03em; margin-right: 2px; }

.article-cover {
  width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius-lg);
  margin: 16px 0 22px; background: #e2e8f0;
}

/* ---- Table of contents ---- */
.toc-box { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; margin: 0 0 24px; }
.toc-box summary { font-size: 0.82rem; font-weight: 800; color: #0f172a; cursor: pointer; display: flex; align-items: center; gap: 6px; list-style: none; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary i.chev { transition: transform 0.2s ease; margin-left: auto; }
.toc-box[open] summary i.chev { transform: rotate(180deg); }
.toc-list { list-style: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-light); }
.toc-list li { margin: 4px 0; }
.toc-list li.lvl-3 { padding-left: 16px; }
.toc-list a { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; display: block; padding: 3px 0; }
.toc-list a:hover, .toc-list a.active { color: var(--primary); }
.toc-list a.active { font-weight: 800; }

/* ---- Font-size control ---- */
.font-size-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-full); overflow: hidden; }
.font-size-ctrl button { width: 30px; height: 28px; background: #fff; color: var(--text-muted); font-weight: 800; font-size: 0.7rem; }
.font-size-ctrl button:first-child { border-right: 1px solid var(--border); }
.font-size-ctrl button:hover { background: var(--primary-light); color: var(--primary); }

/* Sanitised body: <p><br><strong><b><em><i><u><s><strike><h2><h3><ul><ol><li><blockquote><a><img> can appear. */
.article-body { font-size: calc(1.02rem * var(--font-scale, 1)); line-height: 1.75; color: #1e293b; }
.article-body p { margin: 0 0 1.1em; }
.article-body h2 { font-size: calc(1.35rem * var(--font-scale, 1)); font-weight: 800; margin: 1.6em 0 0.5em; color: var(--text-main); letter-spacing: -0.01em; scroll-margin-top: 90px; }
.article-body h3 { font-size: calc(1.12rem * var(--font-scale, 1)); font-weight: 800; margin: 1.4em 0 0.4em; color: var(--text-main); scroll-margin-top: 90px; }
.article-body strong, .article-body b { font-weight: 800; color: var(--text-main); }
.article-body ul, .article-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin: 0.35em 0; }
.article-body li::marker { color: var(--primary); font-weight: 800; }
.article-body blockquote {
  margin: 1.4em 0; padding: 10px 18px; border-left: 4px solid var(--primary); background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: #1e293b;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--primary-hover); }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1.2em 0; display: block; box-shadow: var(--shadow-subtle); }
/* Resizable inline images from the trainer/admin editor (see
   HtmlSanitizer::clean() — only this exact class + a width-only style
   survive sanitization). Capped at 100% so a size picked on desktop
   never overflows a narrow phone screen. */
.article-body .editor-inline-img { max-width: 100%; display: block; margin: 1.2em 0; }
.article-body .editor-inline-img img { margin: 0; box-shadow: none; }

/* ---- Tags row ---- */
.article-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0; }
.article-tags-row a { background: #f1f5f9; color: #475569; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-sm); transition: var(--transition); }
.article-tags-row a:hover { background: var(--primary-light); color: var(--primary); }

/* ---- Promo CTA card (book a session / explore workshops) ---- */
.article-promo-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; border-radius: var(--radius-lg);
  padding: 18px 20px; margin: 28px 0; box-shadow: var(--shadow-card);
}
.article-promo-cta h4 { font-size: 0.98rem; font-weight: 800; margin-bottom: 3px; }
.article-promo-cta p { font-size: 0.76rem; color: #cbd5e1; }
.article-promo-cta .btn { flex-shrink: 0; background: #fff; color: #0f172a; font-weight: 800; }
.article-promo-cta .btn:hover { background: #e2e8f0; }

.article-author-card {
  display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin-top: 28px; box-shadow: var(--shadow-subtle); flex-wrap: wrap;
}
.article-author-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #e2e8f0; flex-shrink: 0; }
.article-author-card strong { font-size: 0.92rem; font-weight: 800; }
.article-author-card p { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0 10px; }
.article-author-card .btn { padding: 7px 14px; font-size: 0.78rem; }
.article-author-card .credibility-tag { margin: 2px 0 8px; }
.article-author-card .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Prev / Next chronological navigation ---- */
.prev-next-nav { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 780px; margin: 24px auto; }
@media (min-width: 640px) { .prev-next-nav { grid-template-columns: 1fr 1fr; } }
.pn-card {
  display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px; transition: var(--transition); min-width: 0;
}
.pn-card:hover { border-color: var(--primary); box-shadow: var(--shadow-subtle); }
.pn-card.next { text-align: right; align-items: flex-end; }
.pn-card .pn-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--text-subtle); letter-spacing: 0.04em; display: flex; align-items: center; gap: 4px; }
.pn-card.next .pn-label { flex-direction: row-reverse; }
.pn-card .pn-title { font-size: 0.82rem; font-weight: 800; color: #0f172a; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- Related / more-articles sections (reuse the listing grid + card look) ---- */
.related-section { max-width: 780px; margin: 8px auto 24px; }
.related-section .app-section-header { margin-bottom: 10px; }

/* ---- Recently viewed rail (client-rendered from localStorage; hidden until JS fills it) ---- */
.recent-rail { display: none; max-width: 780px; margin: 0 auto 24px; }
.recent-rail.has-items { display: block; }
.recent-rail-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.recent-rail-scroll::-webkit-scrollbar { display: none; }
.recent-pill {
  flex: 0 0 170px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  text-decoration: none; transition: var(--transition);
}
.recent-pill:hover { border-color: var(--primary); box-shadow: var(--shadow-subtle); }
.recent-pill img { width: 100%; height: 70px; object-fit: cover; background: #1e293b; }
.recent-pill span { display: block; padding: 6px 8px; font-size: 0.7rem; font-weight: 700; color: #0f172a; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Shared card / row styles (same as the profile sidebar) */
.article-more { max-width: 780px; margin: 0 auto 24px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-subtle); }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-title-lockup { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 800; min-width: 0; }
.card-title-lockup i { font-size: 1.1rem; color: var(--accent-amber-text, #b45309); flex-shrink: 0; }
.card-title-lockup span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-item-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); width: 100%; min-width: 0; }
.article-item-row:last-child { border-bottom: none; padding-bottom: 0; }
.article-item-thumb { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.article-item-thumb.ph { display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: #94a3b8; font-size: 1.2rem; }
.article-item-info { min-width: 0; flex: 1; }
.article-item-info h5 { font-size: 0.8rem; font-weight: 700; line-height: 1.3; }
.article-item-info span { font-size: 0.68rem; color: var(--text-subtle); }
.article-item-row:hover h5 { color: var(--primary); }

/* ---- Print ---- */
@media print {
  .sticky-read-bar, .mobile-action-bar, .reading-side-dock, .reading-progress-track,
  header.app-header, .app-dock, footer.app-footer, .share-row, .toc-box,
  .article-promo-cta, .newsletter-mini-bar, .recent-rail, .prev-next-nav,
  .related-section, .article-more, .breadcrumb-bar { display: none !important; }
  .article-page { max-width: 100%; }
  .article-body { font-size: 11pt; color: #000; }
  a { color: #000 !important; text-decoration: none !important; }
}
