/* ============================================================================
   LESI LIFE — BLOG & KNOWLEDGE HUB STYLES (blog.html)
   Conflict-free, 100% responsive Sinhala & English editorial design system
   supporting Hub Directory, Featured Spotlight, Sticky & Mobile ToC,
   Responsive Data Tables, Reading Mode (Dark/Paper/Light), Comments & Related.
   ============================================================================ */

:root {
  --blog-max-w: 1240px;
  --blog-card-bg: linear-gradient(155deg, rgba(20, 28, 22, 0.86) 0%, rgba(10, 14, 11, 0.96) 100%);
  --blog-card-border: rgba(214, 182, 90, 0.2);
  --blog-sinhala-font: 'Noto Sans Sinhala', 'DM Sans', sans-serif;
  --article-font-size: 17.5px;
  --article-line-height: 1.9;
}

body.page-blog {
  font-family: var(--blog-sinhala-font);
}

/* ── Top Reading Progress Bar ── */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dk) 0%, var(--gold-lt) 55%, var(--green-lt) 100%);
  z-index: 100001;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 12px rgba(214, 182, 90, 0.7);
  pointer-events: none;
}

/* ── Blog Main Container ── */
.blog-page-container {
  max-width: var(--blog-max-w);
  width: 100%;
  margin: 0 auto;
  padding: clamp(104px, 11vw, 134px) 24px 88px;
  position: relative;
  z-index: 2;
}

/* ============================================================================
   VIEW 1: BLOG HUB & DIRECTORY
   ============================================================================ */
.blog-hub-view {
  width: 100%;
}

.blog-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 34px;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(214, 182, 90, 0.11);
  border: 1px solid rgba(214, 182, 90, 0.36);
  color: var(--gold-lt);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.blog-hero-title {
  font-family: 'Noto Sans Sinhala', 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.24;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}
.blog-hero-title span {
  background: linear-gradient(135deg, #ffffff 10%, var(--gold-lt) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  line-height: 1.78;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 28px;
}

/* ── Search Bar & Quick Chips ── */
.blog-search-bar {
  max-width: 680px;
  margin: 0 auto 18px;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 18px;
  color: var(--gold-lt);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.blog-search-input {
  width: 100%;
  padding: 15px 48px 15px 50px;
  border-radius: 999px;
  background: rgba(16, 23, 18, 0.9);
  border: 1.5px solid rgba(214, 182, 90, 0.3);
  color: var(--white);
  font-family: var(--blog-sinhala-font);
  font-size: 15px;
  outline: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.blog-search-input::placeholder {
  color: rgba(165, 176, 166, 0.78);
}
.blog-search-input:focus {
  border-color: var(--gold-lt);
  background: rgba(18, 28, 21, 0.96);
  box-shadow: 0 0 0 4px rgba(214, 182, 90, 0.16), 0 14px 36px rgba(0, 0, 0, 0.5);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(214, 182, 90, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.search-clear-btn.visible {
  display: flex;
}
.search-clear-btn:hover {
  background: var(--gold);
  color: #070908;
}

.blog-quick-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 24px;
}
.quick-chips-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-lt);
  white-space: nowrap;
}
.quick-chips-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.quick-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(214, 182, 90, 0.2);
  color: #d5dfd7;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.quick-chip:hover {
  background: rgba(214, 182, 90, 0.16);
  border-color: var(--gold);
  color: var(--gold-lt);
  transform: translateY(-1px);
}
.quick-chip.active {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
  color: #070908;
  font-weight: 700;
}

/* ── Category Filter Bar ── */
.category-filter-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}
.cat-pill {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 182, 90, 0.22);
  color: #d0dbd2;
  font-family: var(--blog-sinhala-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.cat-pill:hover {
  border-color: var(--gold);
  color: var(--gold-lt);
  background: rgba(214, 182, 90, 0.1);
}
.cat-pill.active,
.cat-pill[aria-pressed="true"] {
  background: linear-gradient(180deg, #f5df93 0%, #d6b65a 100%);
  border-color: var(--gold-lt);
  color: #070908;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(214, 182, 90, 0.32);
}

/* ── Sort & Results Counter Bar ── */
.blog-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  margin-bottom: 28px;
  border-radius: 16px;
  background: rgba(16, 23, 18, 0.72);
  border: 1px solid rgba(214, 182, 90, 0.18);
}
.results-meta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.results-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}
.active-search-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(214, 182, 90, 0.15);
  border: 1px solid rgba(214, 182, 90, 0.38);
  color: var(--gold-lt);
  font-size: 12.5px;
  font-weight: 600;
}
.active-search-badge[hidden] {
  display: none;
}
.badge-clear-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  cursor: pointer;
}
.badge-clear-btn:hover {
  background: var(--gold);
  color: #070908;
}

.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sort-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.sort-select-shell {
  position: relative;
}
.blog-sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 36px 9px 14px;
  border-radius: 10px;
  background: rgba(11, 16, 12, 0.96)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f3d985' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid rgba(214, 182, 90, 0.3);
  color: var(--white);
  font-family: var(--blog-sinhala-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.blog-sort-select:focus {
  border-color: var(--gold-lt);
  box-shadow: 0 0 0 3px rgba(214, 182, 90, 0.15);
}
.blog-sort-select option {
  background: #0d140f;
  color: var(--white);
}

/* ── Featured Spotlight Card ── */
.featured-post-container {
  margin-bottom: 34px;
}
.featured-post-container:empty {
  display: none;
}

.featured-post-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--blog-card-bg);
  border: 1.5px solid rgba(214, 182, 90, 0.34);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 36px rgba(214, 182, 90, 0.1);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}
.featured-post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(243, 217, 133, 0.62);
}

.featured-img-wrap {
  position: relative;
  min-height: 320px;
  background: #0b110c;
  overflow: hidden;
}
.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.featured-post-card:hover .featured-img-wrap img {
  transform: scale(1.04);
}
.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  color: #070908;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.featured-content {
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.blog-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.blog-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(214, 182, 90, 0.14);
  border: 1px solid rgba(214, 182, 90, 0.34);
  color: var(--gold-lt);
  font-size: 11.5px;
  font-weight: 700;
}
.blog-read-time {
  font-size: 12.5px;
  color: #9cb2a0;
  font-weight: 500;
}
.featured-title {
  font-size: clamp(1.3rem, 2.3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.38;
  color: #ffffff;
}
.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.featured-title a:hover {
  color: var(--gold-lt);
}
.featured-excerpt {
  font-size: 14.5px;
  line-height: 1.72;
  color: #b5c3b8;
}
.btn-read-featured {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--pill-radius);
  background: linear-gradient(180deg, #f5df93 0%, #d6b65a 100%);
  color: #070908;
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(214, 182, 90, 0.34);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-read-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(214, 182, 90, 0.48);
}

/* ── Articles Grid (3 → 2 → 1 Columns) ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--blog-card-bg);
  border: 1px solid var(--blog-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.article-card:hover {
  transform: translateY(-6px);
  border-color: rgba(243, 217, 133, 0.55);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 26px rgba(214, 182, 90, 0.12);
}

.article-card-img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0a100b;
  overflow: hidden;
}
.article-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.article-card:hover .article-card-img-wrap img {
  transform: scale(1.05);
}
.article-card-cat-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(7, 11, 8, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(214, 182, 90, 0.4);
  color: var(--gold-lt);
  font-size: 11px;
  font-weight: 700;
}

.article-card-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.article-card-title {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.48;
  color: #ffffff;
}
.article-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.article-card-title a:hover {
  color: var(--gold-lt);
}
.article-card-excerpt {
  font-size: 13.5px;
  line-height: 1.66;
  color: #a7b6aa;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.card-date {
  font-size: 12px;
  color: var(--muted);
}
.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-lt);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}
.btn-read-more:hover {
  color: #ffffff;
  gap: 8px;
}

.search-highlight {
  background: rgba(243, 217, 133, 0.28);
  color: #fff6d6;
  padding: 0 3px;
  border-radius: 4px;
}

/* ── Empty State ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  border-radius: 22px;
  background: var(--blog-card-bg);
  border: 1px solid rgba(214, 182, 90, 0.24);
}
.empty-state-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 10px;
}
.empty-state p {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 22px;
}
.empty-reset-btn {
  padding: 12px 24px;
  border-radius: var(--pill-radius);
  background: linear-gradient(180deg, #f5df93 0%, #d6b65a 100%);
  color: #070908;
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

/* ============================================================================
   VIEW 2: SINGLE ARTICLE READER
   ============================================================================ */
.article-view {
  display: none;
  width: 100%;
}
.article-view.active {
  display: block;
}

.article-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(214, 182, 90, 0.26);
  color: var(--gold-lt);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.btn-back-link:hover {
  background: rgba(214, 182, 90, 0.14);
  border-color: var(--gold);
  transform: translateX(-3px);
}

.btn-reading-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(214, 182, 90, 0.12);
  border: 1px solid rgba(214, 182, 90, 0.36);
  color: var(--gold-lt);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn-reading-mode:hover {
  background: var(--gold-lt);
  color: #070908;
  transform: translateY(-1px);
}

/* ── Article Header ── */
.article-header {
  max-width: 900px;
  margin-bottom: 30px;
}
.article-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.article-breadcrumbs a {
  color: var(--gold-lt);
  text-decoration: none;
}
.article-breadcrumbs a:hover {
  text-decoration: underline;
}
.article-main-title {
  font-family: var(--blog-sinhala-font);
  font-size: clamp(1.65rem, 3.6vw, 2.65rem);
  font-weight: 800;
  line-height: 1.32;
  color: #ffffff;
  margin-bottom: 14px;
}
.article-header .featured-excerpt {
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  margin-bottom: 20px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(16, 23, 18, 0.78);
  border: 1px solid rgba(214, 182, 90, 0.2);
}
.article-meta-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 13px;
  color: #cad5cc;
}
.meta-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.meta-dot { color: rgba(214, 182, 90, 0.5); }

.article-share-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.share-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 2px;
}
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-share:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: rgba(214, 182, 90, 0.16);
}
.btn-share-wa {
  background: rgba(37, 211, 102, 0.14);
  border-color: rgba(37, 211, 102, 0.35);
  color: #86efac;
}
.btn-share-fb {
  background: rgba(24, 119, 242, 0.16);
  border-color: rgba(24, 119, 242, 0.38);
  color: #93c5fd;
}

/* ── Article 2-Column Reading Grid ── */
.article-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}
.article-main-body {
  min-width: 0;
}

.article-hero-banner {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(214, 182, 90, 0.26);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.52);
  margin-bottom: 24px;
  display: block;
}

/* ── Mobile Collapsible ToC Accordion (Shown <= 1024px) ── */
.mobile-toc-card {
  display: none;
  margin-bottom: 24px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(20, 28, 22, 0.9) 0%, rgba(10, 14, 11, 0.96) 100%);
  border: 1px solid rgba(214, 182, 90, 0.28);
  overflow: hidden;
}
.mobile-toc-card summary {
  list-style: none;
  padding: 15px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gold-lt);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}
.mobile-toc-card summary::-webkit-details-marker { display: none; }
.mobile-toc-chevron {
  font-size: 12px;
  transition: transform 0.25s ease;
}
.mobile-toc-card[open] .mobile-toc-chevron {
  transform: rotate(180deg);
}
.mobile-toc-body {
  padding: 0 18px 16px;
  border-top: 1px solid rgba(214, 182, 90, 0.14);
}
.mobile-toc-body .toc-list {
  margin-top: 12px;
}

/* ── Key Takeaways Box ── */
.article-takeaways-container {
  margin-bottom: 28px;
}
.takeaways-box {
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(214, 182, 90, 0.11) 0%, rgba(16, 24, 18, 0.92) 100%);
  border: 1px solid rgba(214, 182, 90, 0.34);
  border-left: 4px solid var(--gold-lt);
}
.takeaways-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--gold-lt);
  margin-bottom: 12px;
}
.takeaways-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.takeaways-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.68;
  color: #e2ebe4;
}
.takeaways-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-lt);
}

/* ── Rich Article Body Typography ── */
.article-rich-content {
  font-size: var(--article-font-size);
  line-height: var(--article-line-height);
  color: #dde6df;
  overflow-wrap: break-word;
}
.article-rich-content h2 {
  font-family: var(--blog-sinhala-font);
  font-size: clamp(1.32rem, 2.3vw, 1.7rem);
  font-weight: 800;
  color: var(--gold-lt);
  margin: 38px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(214, 182, 90, 0.22);
  line-height: 1.4;
  scroll-margin-top: 104px;
}
.article-rich-content h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  color: #ffffff;
  margin: 26px 0 10px;
  line-height: 1.42;
  scroll-margin-top: 104px;
}
.article-rich-content p {
  margin-bottom: 18px;
}
.article-rich-content ul,
.article-rich-content ol {
  margin: 0 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-rich-content li {
  line-height: 1.82;
}
.article-rich-content strong {
  color: #ffffff;
  font-weight: 700;
}
.article-rich-content a {
  color: var(--gold-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-rich-content a:hover {
  color: #ffffff;
}

/* Callout Boxes */
.callout-box {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(214, 182, 90, 0.08);
  border: 1px solid rgba(214, 182, 90, 0.28);
  border-left: 4px solid var(--gold);
  font-size: 0.95em;
  line-height: 1.75;
}
.callout-box.tip {
  background: rgba(61, 184, 42, 0.09);
  border-color: rgba(61, 184, 42, 0.3);
  border-left-color: #6ce856;
}
.callout-box.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.32);
  border-left-color: #fbbf24;
}
.callout-box h4 {
  color: var(--gold-lt);
  font-size: 1em;
  margin-bottom: 6px;
}
.callout-box.tip h4 { color: #86efac; }
.callout-box.warning h4 { color: #fde68a; }
.callout-box p:last-child { margin-bottom: 0; }

/* Responsive Data Tables */
.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border-radius: 14px;
  border: 1px solid rgba(214, 182, 90, 0.24);
  background: rgba(11, 16, 12, 0.85);
}
.blog-data-table,
.article-rich-content table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14.5px;
  text-align: left;
}
.blog-data-table th,
.article-rich-content th {
  background: rgba(214, 182, 90, 0.14);
  color: var(--gold-lt);
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(214, 182, 90, 0.25);
}
.blog-data-table td,
.article-rich-content td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #d6e1d8;
  vertical-align: top;
}
.blog-data-table tr:last-child td,
.article-rich-content tr:last-child td {
  border-bottom: none;
}

/* ── Tags & Engagement Bar ── */
.article-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.article-tag-chip {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(214, 182, 90, 0.22);
  color: var(--gold-lt);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.article-tag-chip:hover {
  background: rgba(214, 182, 90, 0.18);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.article-engagement-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(16, 23, 18, 0.78);
  border: 1px solid rgba(214, 182, 90, 0.22);
  margin-bottom: 36px;
}
.btn-engage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(214, 182, 90, 0.28);
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.btn-engage:hover {
  border-color: var(--gold-lt);
  background: rgba(214, 182, 90, 0.14);
  transform: translateY(-1px);
}
.btn-engage.liked,
.btn-engage.bookmarked {
  background: rgba(214, 182, 90, 0.22);
  border-color: var(--gold-lt);
  color: var(--gold-lt);
}

/* ── Comments Section ── */
.comments-section {
  padding: 28px;
  border-radius: 20px;
  background: var(--blog-card-bg);
  border: 1px solid var(--blog-card-border);
  margin-bottom: 36px;
}
.comments-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
}
.comment-form {
  margin-bottom: 24px;
}
.comment-form h4 {
  font-size: 14.5px;
  color: var(--gold-lt);
  margin-bottom: 14px;
}
.comment-input-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.comment-field {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(214, 182, 90, 0.22);
  color: var(--white);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.comment-field:focus {
  border-color: var(--gold-lt);
  box-shadow: 0 0 0 3px rgba(214, 182, 90, 0.14);
}
textarea.comment-field {
  min-height: 100px;
  resize: vertical;
}
.btn-comment-submit {
  padding: 12px 24px;
  border-radius: var(--pill-radius);
  background: linear-gradient(180deg, #f5df93 0%, #d6b65a 100%);
  color: #070908;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-comment-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(214, 182, 90, 0.36);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comment-item {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  color: #070908;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comment-date {
  font-size: 12px;
  color: var(--muted);
}
.comment-text {
  font-size: 14px;
  line-height: 1.68;
  color: #d0dcd2;
  white-space: pre-wrap;
  word-break: break-word;
}
.no-comments-note {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

/* ── Related Articles ── */
.related-section {
  margin-top: 12px;
}
.related-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ── Sticky Desktop Sidebar ── */
.article-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-widget {
  padding: 22px;
  border-radius: 18px;
  background: var(--blog-card-bg);
  border: 1px solid var(--blog-card-border);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--gold-lt);
  margin-bottom: 14px;
}
.blog-sidebar-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.blog-sidebar-note strong {
  color: var(--white);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-list a {
  display: block;
  padding: 7px 12px;
  border-radius: 10px;
  border-left: 2px solid transparent;
  color: #b5c3b8;
  font-size: 13.5px;
  line-height: 1.48;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.toc-list a:hover {
  color: var(--gold-lt);
  background: rgba(214, 182, 90, 0.08);
}
.toc-list a.active {
  color: var(--gold-lt);
  font-weight: 700;
  background: rgba(214, 182, 90, 0.13);
  border-left-color: var(--gold-lt);
}

.cta-consult-box {
  background: linear-gradient(155deg, rgba(22, 38, 25, 0.94) 0%, rgba(10, 16, 12, 0.98) 100%);
  border-color: rgba(61, 184, 42, 0.36);
}
.cta-consult-box h4 {
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.4;
}
.cta-consult-box p {
  font-size: 13px;
  color: #b5c5b8;
  line-height: 1.6;
  margin-bottom: 16px;
}
.btn-sidebar-wa {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--pill-radius);
  background: linear-gradient(135deg, #128C7E, #25D366);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.34);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.btn-sidebar-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.52);
}

/* ============================================================================
   READING MODE (DARK / SEPIA / LIGHT) & FLOATING CONTROLS BAR
   ============================================================================ */
.reading-controls-bar {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(11, 16, 12, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(214, 182, 90, 0.44);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.78);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-width: calc(100vw - 24px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
}
.reading-controls-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.reading-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reading-ctrl-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 2px;
}
.font-ctrl-btn,
.theme-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(214, 182, 90, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.font-ctrl-btn:hover,
.theme-btn:hover,
.theme-btn.active {
  background: var(--gold-lt);
  color: #070908;
  border-color: var(--gold-lt);
}
.font-size-indicator {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-lt);
  min-width: 36px;
  text-align: center;
}
.btn-exit-reader {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-exit-reader:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Active Reading Mode Layout */
body.reading-mode-active #navbar,
body.reading-mode-active footer,
body.reading-mode-active .article-sidebar,
body.reading-mode-active .floating-socials,
body.reading-mode-active .ai-chat-launcher-wrap,
body.reading-mode-active .ai-chat-widget,
body.reading-mode-active .scroll-btns,
body.reading-mode-active .comments-section,
body.reading-mode-active .related-section {
  display: none;
}

body.reading-mode-active .blog-page-container {
  max-width: 820px;
  padding-top: 40px;
  padding-bottom: 120px;
}
body.reading-mode-active .article-layout-grid {
  grid-template-columns: 1fr;
}

/* Reading Mode: Paper / Sepia Theme */
body.reading-mode-active.reader-theme-sepia {
  background: #f4ecd8;
  color: #2b2114;
}
body.reading-mode-active.reader-theme-sepia .article-main-title,
body.reading-mode-active.reader-theme-sepia .article-rich-content h3,
body.reading-mode-active.reader-theme-sepia .article-rich-content strong {
  color: #1f160c;
}
body.reading-mode-active.reader-theme-sepia .article-rich-content,
body.reading-mode-active.reader-theme-sepia .featured-excerpt,
body.reading-mode-active.reader-theme-sepia .article-meta-info,
body.reading-mode-active.reader-theme-sepia .share-label {
  color: #3a2d1c;
}
body.reading-mode-active.reader-theme-sepia .article-breadcrumbs,
body.reading-mode-active.reader-theme-sepia .article-breadcrumbs a {
  color: #6b4912;
}
body.reading-mode-active.reader-theme-sepia .blog-cat-pill {
  background: rgba(124, 82, 16, 0.14);
  border-color: rgba(124, 82, 16, 0.35);
  color: #5c3a06;
}
body.reading-mode-active.reader-theme-sepia .btn-share {
  background: #e6d8b8;
  border-color: rgba(124, 82, 16, 0.35);
  color: #2b2114;
}
body.reading-mode-active.reader-theme-sepia .btn-share-wa {
  background: rgba(21, 128, 61, 0.14);
  border-color: rgba(21, 128, 61, 0.42);
  color: #14532d;
}
body.reading-mode-active.reader-theme-sepia .btn-share-fb {
  background: rgba(29, 78, 216, 0.12);
  border-color: rgba(29, 78, 216, 0.38);
  color: #1e3a8a;
}
body.reading-mode-active.reader-theme-sepia .article-rich-content h2,
body.reading-mode-active.reader-theme-sepia .takeaways-title {
  color: #7c5210;
  border-color: rgba(124, 82, 16, 0.25);
}
body.reading-mode-active.reader-theme-sepia .takeaways-box,
body.reading-mode-active.reader-theme-sepia .article-meta-bar,
body.reading-mode-active.reader-theme-sepia .callout-box,
body.reading-mode-active.reader-theme-sepia .blog-callout,
body.reading-mode-active.reader-theme-sepia .table-scroll-wrap,
body.reading-mode-active.reader-theme-sepia .article-engagement-bar,
body.reading-mode-active.reader-theme-sepia .mobile-toc-card {
  background: #ebe0c6;
  border-color: rgba(124, 82, 16, 0.28);
  color: #2b2114;
}
body.reading-mode-active.reader-theme-sepia .takeaways-list li,
body.reading-mode-active.reader-theme-sepia .blog-callout .callout-body,
body.reading-mode-active.reader-theme-sepia .mobile-toc-card summary,
body.reading-mode-active.reader-theme-sepia .mobile-toc-card .toc-list a,
body.reading-mode-active.reader-theme-sepia td {
  color: #2b2114;
}
body.reading-mode-active.reader-theme-sepia th {
  background: rgba(124, 82, 16, 0.14);
  color: #5c3a06;
}
body.reading-mode-active.reader-theme-sepia .btn-back-link,
body.reading-mode-active.reader-theme-sepia .btn-reading-mode,
body.reading-mode-active.reader-theme-sepia .btn-engage,
body.reading-mode-active.reader-theme-sepia .article-tag-chip {
  background: #e6d8b8;
  color: #3a2d1c;
  border-color: rgba(124, 82, 16, 0.35);
}

/* Reading Mode: Crisp Light Theme */
body.reading-mode-active.reader-theme-light {
  background: #f8faf8;
  color: #151c17;
}
body.reading-mode-active.reader-theme-light .article-main-title,
body.reading-mode-active.reader-theme-light .article-rich-content h3,
body.reading-mode-active.reader-theme-light .article-rich-content strong {
  color: #0e1410;
}
body.reading-mode-active.reader-theme-light .article-rich-content,
body.reading-mode-active.reader-theme-light .featured-excerpt,
body.reading-mode-active.reader-theme-light .article-meta-info,
body.reading-mode-active.reader-theme-light .share-label {
  color: #27332a;
}
body.reading-mode-active.reader-theme-light .article-breadcrumbs,
body.reading-mode-active.reader-theme-light .article-breadcrumbs a {
  color: #4b5d50;
}
body.reading-mode-active.reader-theme-light .blog-cat-pill {
  background: rgba(124, 88, 18, 0.12);
  border-color: rgba(124, 88, 18, 0.32);
  color: #6b4910;
}
body.reading-mode-active.reader-theme-light .btn-share {
  background: #e5ece7;
  border-color: rgba(21, 28, 23, 0.2);
  color: #151c17;
}
body.reading-mode-active.reader-theme-light .btn-share-wa {
  background: rgba(21, 128, 61, 0.12);
  border-color: rgba(21, 128, 61, 0.35);
  color: #14532d;
}
body.reading-mode-active.reader-theme-light .btn-share-fb {
  background: rgba(29, 78, 216, 0.1);
  border-color: rgba(29, 78, 216, 0.35);
  color: #1e3a8a;
}
body.reading-mode-active.reader-theme-light .article-rich-content h2,
body.reading-mode-active.reader-theme-light .takeaways-title {
  color: #7c5812;
  border-color: rgba(124, 88, 18, 0.22);
}
body.reading-mode-active.reader-theme-light .takeaways-box,
body.reading-mode-active.reader-theme-light .article-meta-bar,
body.reading-mode-active.reader-theme-light .callout-box,
body.reading-mode-active.reader-theme-light .blog-callout,
body.reading-mode-active.reader-theme-light .table-scroll-wrap,
body.reading-mode-active.reader-theme-light .article-engagement-bar,
body.reading-mode-active.reader-theme-light .mobile-toc-card {
  background: #eef3ef;
  border-color: rgba(21, 28, 23, 0.14);
  color: #151c17;
}
body.reading-mode-active.reader-theme-light .takeaways-list li,
body.reading-mode-active.reader-theme-light .blog-callout .callout-body,
body.reading-mode-active.reader-theme-light .mobile-toc-card summary,
body.reading-mode-active.reader-theme-light .mobile-toc-card .toc-list a,
body.reading-mode-active.reader-theme-light td {
  color: #1f2b22;
}
body.reading-mode-active.reader-theme-light th {
  background: rgba(21, 28, 23, 0.08);
  color: #151c17;
}
body.reading-mode-active.reader-theme-light .btn-back-link,
body.reading-mode-active.reader-theme-light .btn-reading-mode,
body.reading-mode-active.reader-theme-light .btn-engage,
body.reading-mode-active.reader-theme-light .article-tag-chip {
  background: #e5ece7;
  color: #151c17;
  border-color: rgba(21, 28, 23, 0.2);
}

/* ── Toast Notification ── */
.blog-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  z-index: 10005;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(14, 22, 16, 0.96);
  border: 1px solid var(--gold);
  color: var(--gold-lt);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, bottom 0.25s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
body.reading-mode-active .blog-toast {
  bottom: calc(132px + env(safe-area-inset-bottom, 0px));
}
.blog-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================================
   BLOG RESPONSIVE BREAKPOINTS (1024px, 768px, 480px, 360px)
   ============================================================================ */
@media (max-width: 1024px) {
  .featured-post-card {
    grid-template-columns: 1fr;
  }
  .featured-img-wrap {
    min-height: 240px;
    aspect-ratio: 16 / 9;
  }
  .featured-content {
    padding: 26px 24px;
  }
  .articles-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .article-layout-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-sidebar {
    position: static;
  }
  .article-sidebar .sidebar-toc-widget {
    display: none;
  }
  .mobile-toc-card {
    display: block;
  }
}

@media (max-width: 768px) {
  .blog-page-container {
    padding: 96px 16px 64px;
  }
  .blog-hero {
    margin-bottom: 24px;
  }
  .blog-search-input {
    font-size: 16px; /* Prevents iOS Safari auto-zoom */
    padding: 13px 44px 13px 46px;
  }
  /* Horizontally swipeable category pills on mobile */
  .category-filter-wrap {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 10px;
    margin: 0 -4px;
    scrollbar-width: none;
  }
  .category-filter-wrap::-webkit-scrollbar {
    display: none;
  }
  .cat-pill {
    padding: 8px 15px;
    font-size: 12.5px;
  }

  .blog-sort-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 12px;
  }
  .sort-select-wrap {
    justify-content: space-between;
  }
  .sort-select-shell {
    flex: 1;
    min-width: 190px;
  }
  .blog-sort-select {
    width: 100%;
    font-size: 14px;
  }

  .articles-grid,
  .related-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .featured-content {
    padding: 20px 18px 22px;
  }
  .btn-read-featured {
    width: 100%;
    justify-content: center;
  }

  .article-top-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-back-link,
  .btn-reading-mode {
    width: 100%;
    justify-content: center;
  }
  .article-meta-bar {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
  }
  .article-rich-content {
    font-size: min(var(--article-font-size), 16.5px);
  }
  .comments-section {
    padding: 20px 16px;
  }
  .comment-field {
    font-size: 16px;
  }
  .btn-comment-submit {
    width: 100%;
  }

  .reading-controls-bar {
    border-radius: 18px;
    padding: 12px 14px;
    gap: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 20px);
  }
  .btn-exit-reader {
    width: 100%;
  }
  body.reading-mode-active .blog-toast {
    bottom: calc(172px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .blog-page-container {
    padding: 90px 14px 56px;
  }
  .blog-hero-badge {
    font-size: 10px;
    padding: 6px 13px;
  }
  .blog-quick-chips {
    justify-content: flex-start;
  }
  .quick-chips-list {
    justify-content: flex-start;
  }
  .article-card-body {
    padding: 16px;
  }
  .takeaways-box {
    padding: 16px;
  }
  .article-engagement-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-engage {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .blog-page-container {
    padding: 86px 12px 48px;
  }
  .article-main-title {
    font-size: 1.48rem;
  }
  .btn-share {
    padding: 6px 10px;
    font-size: 11.5px;
  }
}
