/* ============================================================
   CUSTOM STYLE â€” "Minimal Editorial (Trust)" â€” Veritya Daily
   Consumes tokens from tokens.css (load tokens FIRST).
   Mobile-first, desktop via @media (min-width: 768px).
   ============================================================ */

/* 1. RESET & BASE */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}
body, img, picture { transition: background-color var(--transition); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  margin: 0;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }
a { color: var(--brand-blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-blue-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* 2. LAYOUT CONTAINERS */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--mobile-margin); }
.article-container { max-width: var(--article-max); margin-inline: auto; padding-inline: var(--mobile-margin); }
@media (min-width: 768px) {
  .container { padding-inline: var(--desktop-margin); }
  .article-container { padding-inline: var(--desktop-margin); }
}

/* 3. STICKY HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.site-logo {
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700;
  color: var(--text-primary); text-decoration: none; letter-spacing: -0.03em;
  display: inline-flex; align-items: center; gap: 8px;
}
.site-logo:hover { text-decoration: none; color: var(--text-primary); }
.site-logo .dot { width: 14px; height: 14px; background: var(--brand-blue); border-radius: 4px; flex-shrink: 0; }
.site-logo img { height: 28px; width: auto; }
[data-theme="dark"] .site-logo img { content: url("../img/logo-dark.svg"); }
.nav-desktop { display: none; gap: var(--space-4); align-items: center; }
.nav-desktop a { color: var(--text-primary); font-size: 15px; font-weight: 500; }
.nav-desktop a:hover { color: var(--brand-blue); text-decoration: none; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.header-actions { display: flex; align-items: center; gap: var(--space-1); }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch-min); height: var(--touch-min);
  border: none; background: transparent; color: var(--text-primary);
  cursor: pointer; border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.icon-button:hover { background: var(--bg-soft); }
.icon-button svg { width: 22px; height: 22px; }

/* 4. CRYPTO PRICE TICKER */
.price-ticker {
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
  padding: var(--space-2) var(--mobile-margin); overflow-x: auto; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; scrollbar-width: none;
}
.price-ticker::-webkit-scrollbar { display: none; }
.price-ticker .ticker-track { display: inline-flex; gap: var(--space-4); min-width: max-content; }
.price-ticker .ticker-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); }
.price-ticker .ticker-item .sym { font-weight: 500; color: var(--text-muted); }
.price-ticker .ticker-item .price { font-weight: 500; }
.price-ticker .ticker-item .change.up { color: var(--green-up); }
.price-ticker .ticker-item .change.down { color: var(--red-down); }

/* 5. HOMEPAGE HERO */
.hero { padding-block: var(--space-5); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: stretch; }
.hero-image-wrap { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { display: flex; flex-direction: column; justify-content: center; }
.hero-text .kicker { margin-bottom: var(--space-2); }
.hero-title { font-size: var(--fs-h1); font-weight: 700; line-height: 1.15; margin-bottom: var(--space-2); }
.hero-title a { color: var(--text-primary); }
.hero-title a:hover { color: var(--brand-blue); text-decoration: none; }
.hero-meta { color: var(--text-muted); font-size: var(--fs-caption); margin-bottom: var(--space-3); }
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.4fr 1fr; gap: var(--space-5); }
  .hero-title { font-size: var(--fs-display); }
}

/* 6. KICKER */
.kicker {
  display: inline-block; font-family: var(--font-body); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue); margin-bottom: var(--space-2);
}
.kicker a { color: inherit; }
@media (min-width: 768px) { .kicker { font-size: 12px; } }

/* 7. SECTION HEADER */
.section { padding-block: var(--space-5); }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4); padding-bottom: var(--space-2); border-bottom: 2px solid var(--text-primary);
}
.section-title { font-size: var(--fs-h3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.section-link {
  font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--brand-blue); white-space: nowrap;
}

/* 8. POST CARD */
.card-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 640px) { .card-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius); overflow: hidden; transition: transform var(--transition-fast);
}
.post-card:hover { transform: translateY(-2px); }
.post-card__image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.post-card:hover .post-card__image img { transform: scale(1.03); }
.post-card__body { padding: var(--space-3); display: flex; flex-direction: column; flex: 1; }
.post-card__title {
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-snug);
  margin: 0 0 var(--space-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__title a { color: var(--text-primary); }
.post-card__title a:hover { color: var(--brand-blue); text-decoration: none; }
.post-card__meta { margin-top: auto; font-size: var(--fs-caption); color: var(--text-muted); }

/* 9. TRENDING CHIPS */
.trending-bar { display: flex; align-items: center; gap: var(--space-2); padding-block: var(--space-3); overflow-x: auto; scrollbar-width: none; }
.trending-bar::-webkit-scrollbar { display: none; }
.trending-label {
  display: inline-flex; align-items: center; gap: 6px; background: var(--amber); color: #1A1A1A;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 10px; border-radius: var(--radius-sm); white-space: nowrap; flex-shrink: 0;
}
.trending-chips { display: inline-flex; gap: var(--space-2); }
.trending-chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-size: 13px; color: var(--text-primary); white-space: nowrap;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.trending-chip:hover { border-color: var(--brand-blue); color: var(--brand-blue); text-decoration: none; }

/* 10. BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--touch-min); padding: 12px 24px; font-family: var(--font-body); font-size: 16px;
  font-weight: 500; border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast); text-decoration: none;
}
.btn--primary { background: var(--brand-blue); color: #FFFFFF; }
.btn--primary:hover { background: var(--brand-blue-hover); color: #FFFFFF; text-decoration: none; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--brand-blue); border: 1px solid var(--brand-blue); }
.btn--ghost:hover { background: var(--brand-blue-soft); text-decoration: none; }

/* 11. ARTICLE PAGE */
.article-header { padding-block: var(--space-5) var(--space-3); text-align: left; }
.breadcrumbs { font-size: var(--fs-caption); color: var(--text-muted); margin-bottom: var(--space-3); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brand-blue); }
.breadcrumbs .sep { margin-inline: 6px; opacity: 0.6; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  font-size: var(--fs-caption); color: var(--text-muted); margin-top: var(--space-3);
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--border);
}
.article-meta .updated { color: var(--text-primary); font-weight: 500; }
.article-title { font-size: var(--fs-h1); font-weight: 700; line-height: 1.15; margin: var(--space-2) 0 var(--space-3); }
@media (min-width: 768px) { .article-title { font-size: var(--fs-display); } }
.article-hero-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-block: var(--space-4); }
.article-body { font-size: var(--fs-body); line-height: var(--lh-body); padding-block: var(--space-4); }
.article-body p { margin-bottom: var(--space-3); }
.article-body h2 { font-size: var(--fs-h2); margin-top: var(--space-6); margin-bottom: var(--space-2); }
.article-body h3 { font-size: var(--fs-h3); margin-top: var(--space-5); margin-bottom: var(--space-2); }
.article-body img { border-radius: var(--radius); margin: var(--space-4) 0; }
.article-body blockquote {
  border-left: 4px solid var(--brand-blue); margin: var(--space-4) 0; padding: var(--space-2) var(--space-4);
  font-family: var(--font-display); font-size: var(--fs-h3); font-style: italic; color: var(--text-primary);
}
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 768px) { .article-body { font-size: 18px; line-height: var(--lh-relaxed); } }

/* 12. TABLE OF CONTENTS */
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-5) 0; }
.toc-title { font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: var(--space-2); }
.toc ol { margin: 0; padding-left: var(--space-4); }
.toc li { margin-bottom: var(--space-1); font-size: 15px; }

/* 13. AD ZONES */
.ad-zone { margin: var(--space-6) 0; min-height: 100px; display: flex; align-items: center; justify-content: center; }

/* 14. FAQ BLOCK */
.faq-block { margin: var(--space-5) 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: var(--space-3) 0; }
.faq-item__question { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; margin-bottom: var(--space-2); }

/* 15. AUTHOR BIO BOX */
.author-box {
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4);
  margin: var(--space-5) 0; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.author-box__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--brand-blue-soft); }
.author-box__name { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; margin-bottom: 4px; }
.author-box__role { font-size: var(--fs-caption); color: var(--brand-blue); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-2); }
.author-box__bio { font-size: 15px; color: var(--text-muted); }

/* 16. DISCLOSURE */
.disclosure {
  font-size: 13px; color: var(--text-muted); background: var(--bg-soft);
  border-left: 3px solid var(--text-muted); padding: var(--space-3);
  margin: var(--space-4) 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* 17. TAGS & SHARE */
.post-footer { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.tag { font-size: 13px; color: var(--text-muted); padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.tag:hover { color: var(--brand-blue); border-color: var(--brand-blue); text-decoration: none; }
.share-buttons { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.share-buttons .icon-button { border: 1px solid var(--border); }

/* 18. NEWSLETTER CTA */
.newsletter-cta {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-5) var(--space-4); margin: var(--space-6) 0; text-align: center;
}
.newsletter-cta h3 { font-size: var(--fs-h3); margin-bottom: var(--space-2); }
.newsletter-cta p { color: var(--text-muted); margin-bottom: var(--space-3); }
.newsletter-form { display: flex; flex-direction: column; gap: var(--space-2); max-width: 480px; margin-inline: auto; }
@media (min-width: 480px) { .newsletter-form { flex-direction: row; } }
.newsletter-form input[type="email"] {
  flex: 1; min-height: var(--touch-min); padding: 10px 16px; font-size: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary);
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }

/* 19. READ NEXT */
.read-next {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4);
  margin: var(--space-5) 0; background: var(--brand-blue); color: #FFFFFF; border-radius: var(--radius);
  transition: transform var(--transition-fast);
}
.read-next:hover { transform: translateY(-2px); text-decoration: none; color: #FFFFFF; }
.read-next__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.8; margin-bottom: 4px; }
.read-next__title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: #FFFFFF; }
.read-next__arrow { margin-left: auto; font-size: 24px; }

/* 20. FOOTER */
.site-footer {
  background: var(--bg-soft); border-top: 1px solid var(--border); padding-block: var(--space-6);
  margin-top: var(--space-7);
  padding-bottom: calc(var(--space-6) + var(--bottom-nav-height) + env(safe-area-inset-bottom));
}
@media (min-width: 768px) { .site-footer { padding-bottom: var(--space-6); } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a { color: var(--text-muted); font-size: 15px; }
.footer-links a:hover { color: var(--brand-blue); }
.footer-bottom {
  margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border);
  font-size: var(--fs-caption); color: var(--text-muted); text-align: center;
}

/* 21. READING PROGRESS BAR */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--brand-blue); z-index: 200; transition: width 100ms linear;
}

/* 22. BOTTOM MOBILE NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; display: flex;
  background: var(--bg-primary); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-muted); font-size: 10px; font-weight: 500; text-decoration: none;
  min-height: var(--touch-min); transition: color var(--transition-fast);
}
.bottom-nav__item.active, .bottom-nav__item:hover { color: var(--brand-blue); }
.bottom-nav__item svg { width: 22px; height: 22px; }
@media (min-width: 768px) { .bottom-nav { display: none; } }
@media (max-width: 767px) { body { padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); } }

/* 23. LEGAL/STATIC PAGE STYLES */
.legal-content { max-width: var(--article-max); margin-inline: auto; padding: var(--space-5) var(--mobile-margin); }
@media (min-width: 768px) { .legal-content { padding: var(--space-6) var(--desktop-margin); } }
.legal-content h1 { font-size: var(--fs-h1); margin-bottom: var(--space-3); }
.legal-content h2 { font-size: var(--fs-h2); margin-top: var(--space-5); margin-bottom: var(--space-2); }
.legal-content h3 { font-size: var(--fs-h3); margin-top: var(--space-4); margin-bottom: var(--space-2); }
.legal-content p, .legal-content li { font-size: 16px; line-height: var(--lh-relaxed); color: var(--text-primary); }
.legal-content ul, .legal-content ol { padding-left: var(--space-4); }
.legal-content li { margin-bottom: var(--space-2); }
.legal-content table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; }
.legal-content th, .legal-content td { border: 1px solid var(--border); padding: var(--space-2) var(--space-3); text-align: left; font-size: 14px; }
.legal-content th { background: var(--bg-soft); font-weight: 600; }
.legal-content blockquote { border-left: 4px solid var(--brand-blue); margin: var(--space-4) 0; padding: var(--space-2) var(--space-4); background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.legal-content code { font-family: var(--font-mono); font-size: 14px; background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.legal-content .last-updated { color: var(--text-muted); font-size: var(--fs-caption); margin-bottom: var(--space-5); }
.legal-content strong { font-weight: 600; }

/* 24. UTILITY */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-muted { color: var(--text-muted); }
.up { color: var(--green-up); }
.down { color: var(--red-down); }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 999; background: var(--brand-blue); color: #FFFFFF; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.skip-link:focus { left: var(--space-2); top: var(--space-2); }
.placeholder { background: linear-gradient(135deg, var(--brand-blue-soft) 0%, var(--bg-soft) 100%); display: flex; align-items: center; justify-content: center; color: var(--brand-blue); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.05em; }

/* ============================================================
   POST EXTRAS — styling for 30-post template classes
   (appended to custom-style.css to complete missing class styles)
   ============================================================ */

/* --- Header (post template classes) --- */
.post-header .logo, .logo { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); letter-spacing: -0.03em; color: var(--text-primary); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.post-header .logo img, .logo img { height: 26px; width: auto; }
.main-nav { display: none; gap: var(--space-4); align-items: center; }
.main-nav a { color: var(--text-primary); font-size: 15px; font-weight: 500; text-decoration: none; }
.main-nav a:hover { color: var(--brand-blue); }
@media (min-width: 768px) { .main-nav { display: flex; } }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; font-size: 15px; color: var(--text-primary); }

/* --- Article layout (post template) --- */
.article-page { max-width: var(--article-max, 720px); margin-inline: auto; padding-inline: var(--mobile-margin); }
@media (min-width: 768px) { .article-page { padding-inline: var(--desktop-margin); } }
.article-kicker { font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-blue); margin-bottom: var(--space-2); }
.article-date { color: var(--text-muted); font-size: 14px; }
.article-lede { font-size: 19px; line-height: 1.6; color: var(--text-secondary); }
.article-content { font-size: 17px; line-height: 1.75; color: var(--text-primary); }
.article-content p { margin-bottom: var(--space-4); }
.article-content strong { font-weight: 600; }
.article-content ul, .article-content ol { margin-bottom: var(--space-4); padding-left: var(--space-5); }
.article-content li { margin-bottom: var(--space-2); }

/* --- TOC (article-toc variant) --- */
.article-toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-5) 0; }
.article-toc h3 { font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: var(--space-3); }
.article-toc ul { list-style: none; margin: 0; padding: 0; }
.article-toc li { margin-bottom: var(--space-2); font-size: 15px; }
.article-toc a { color: var(--text-secondary); text-decoration: none; }
.article-toc a:hover { color: var(--brand-blue); }

/* --- Key takeaways box --- */
.key-takeaways { background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--brand-blue); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-5) 0; }
.key-takeaways h3 { font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue); margin-bottom: var(--space-3); }
.key-takeaways ul { margin: 0; padding-left: var(--space-4); }
.key-takeaways li { margin-bottom: var(--space-2); font-size: 15px; }

/* --- Share buttons (post variant) --- */
.share-section, .share-label { font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: var(--space-2); }
.share-btns, .share { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-primary); text-decoration: none; transition: all var(--transition-fast); }
.share-btn:hover { border-color: var(--brand-blue); color: var(--brand-blue); text-decoration: none; transform: translateY(-1px); }
.share-x, .share-twitter { background: #000; color: #fff; }
.share-fb, .share-facebook { background: #1877F2; color: #fff; }
.share-linkedin { background: #0A66C2; color: #fff; }
.share-telegram { background: #229ED9; color: #fff; }
.share-reddit { background: #FF4500; color: #fff; }
.share-whatsapp { background: #25D366; color: #fff; }
.share-copy { background: var(--bg-soft); }

/* --- Author bio (post variant) --- */
.author-bio { display: flex; gap: var(--space-4); align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-5) 0; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-info { flex: 1; }
.author-info h4, .author-bio h4 { font-family: var(--font-display); font-size: 17px; margin-bottom: 4px; }
.author-info p, .author-bio p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; }
.author-role { color: var(--brand-blue); font-size: 13px; font-weight: 600; }
.author-social { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.author-social a { color: var(--text-muted); font-size: 14px; text-decoration: none; }
.author-social a:hover { color: var(--brand-blue); }

/* --- Read next (post variant) --- */
.read-next-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin: var(--space-5) 0; }
@media (min-width: 640px) { .read-next-grid { grid-template-columns: 1fr 1fr; } }
.read-next-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); display: block; text-decoration: none; transition: all var(--transition-fast); }
.read-next-card:hover { border-color: var(--brand-blue); transform: translateY(-2px); text-decoration: none; }
.read-next-kicker, .read-next-cat, .rnc-category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue); margin-bottom: 6px; }
.read-next-title, .rnc-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.read-next-all { display: inline-block; margin-top: var(--space-3); color: var(--brand-blue); font-weight: 600; font-size: 14px; text-decoration: none; }

/* --- Tables (post variants) --- */
.data-table, .price-table, .comparison-table, .spec-comparison { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; font-size: 15px; }
.data-table th, .price-table th, .comparison-table th, .spec-comparison th { background: var(--bg-soft); font-weight: 700; text-align: left; padding: 12px; border: 1px solid var(--border); font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.data-table td, .price-table td, .comparison-table td, .spec-comparison td { padding: 12px; border: 1px solid var(--border); }
.data-table tr:nth-child(even), .price-table tr:nth-child(even), .comparison-table tr:nth-child(even) { background: var(--bg-soft); }
.table-wrap, .spec-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--space-4) 0; }
.table-wrap table, .spec-table-wrapper table { margin: 0; min-width: 480px; }

/* --- Ad placeholder (post variant) --- */
.ad-placeholder { margin: var(--space-6) 0; min-height: 100px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Disclaimer box --- */
.disclaimer { background: var(--bg-soft); border-left: 4px solid var(--red-down); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-5) 0; font-size: 14px; color: var(--text-muted); }

/* --- Ticker (post variant) --- */
.ticker-wrap { background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 8px 0; overflow: hidden; }
.ticker-inner { display: inline-flex; gap: var(--space-4); min-width: max-content; animation: ticker-scroll 30s linear infinite; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-up { color: var(--green-up); font-weight: 600; }
.ticker-down { color: var(--red-down); font-weight: 600; }

/* --- Mobile-only utility --- */
.mobile-only { display: block; }
@media (min-width: 768px) { .mobile-only { display: none; } }

/* --- misc --- */
.logo-accent { color: var(--brand-blue); }
.current { color: var(--brand-blue) !important; font-weight: 700; }
.icon-sun, .icon-moon { display: inline-block; }
.card-kicker { font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue); }

/* --- Footer fallback for old template classes --- */
.footer-cols { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 640px) { .footer-inner { grid-template-columns: repeat(3, 1fr); } }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-2); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: var(--text-muted); font-size: 14px; text-decoration: none; }
.footer-col a:hover { color: var(--brand-blue); }

/* --- post header inner + social icons + article meta --- */
.post-header .header-inner, .header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: var(--header-height); }
.logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.article-author { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.article-read-time { color: var(--text-muted); font-size: 14px; }
.read-next-category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue); margin-bottom: 6px; }
.author-social a.twitter:hover { color: #1DA1F2; }
.author-social a.facebook:hover { color: #1877F2; }
.author-social a.linkedin:hover { color: #0A66C2; }
.author-social a.reddit:hover { color: #FF4500; }
.author-social a.telegram:hover { color: #229ED9; }


/* === MOBILE UX FIX v4 (scoped to mobile only) === */

/* Logo: ensure img.logo is constrained on all viewports */
img.logo,
.logo-link img,
a.logo img,
.site-logo img {
  height: 28px !important;
  width: auto !important;
  max-width: 160px;
  object-fit: contain;
}

/* Text logo */
a.logo,
a.site-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Hide main-nav on mobile only */
@media (max-width: 767px) {
  .main-nav {
    display: flex !important;
    visibility: visible !important;
    position: static !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 4px 0;
    order: 3; /* After logo and toggle */
  }
  .main-nav a {
    font-size: 12px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  /* Header: stack logo+toggle on first row, nav on second row centered */
  .header-inner,
  .site-header .container {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 6px 16px;
  }
  .logo, .logo-link, a.logo {
    order: 1;
  }
  .theme-toggle, #themeToggle, #theme-toggle {
    order: 2;
  }
  
  /* Mobile-only: prevent horizontal overflow */
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  .container,
  .article-container,
  .article-page {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  /* Mobile-only: article content wrapping */
  .article-content p,
  .article-body p,
  .article-content li,
  .article-body li,
  .article-content h2,
  .article-body h2,
  .article-content h3,
  .article-body h3,
  .legal-content p,
  .legal-content li {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
  }
  
  .article-content,
  .article-body {
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Mobile-only: table scroll */
  .table-wrap,
  .spec-table-wrapper,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  
  .article-content table,
  .article-body table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
  }
  
  /* Mobile-only: box-sizing safety */
  .key-takeaways,
  .article-toc,
  .toc,
  .author-box,
  .author-info,
  .author-bio,
  .footer-grid,
  .ad-zone,
  .ad-placeholder,
  [class*="ad-zone"],
  [class*="ad_zone"] {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Mobile-only: share buttons wrap */
  .share-section,
  .share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }
  
  /* Mobile-only: read-next single column */
  .read-next-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
  }
}

/* Desktop: show main-nav */
@media (min-width: 768px) {
  .main-nav {
    display: flex !important;
    visibility: visible !important;
    position: static !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .nav-desktop {
    display: flex !important;
  }
  
  .mobile-only {
    display: none;
  }
}

/* === DESKTOP ARTICLE LAYOUT === */
/* Restore reading-width constraint on desktop */
@media (min-width: 768px) {
  /* Article page: centered reading column */
  .article-page {
    max-width: var(--article-max, 720px);
    margin-inline: auto;
    padding-inline: var(--desktop-margin, 32px);
  }
  
  /* Container inside article-page: inherit parent width */
  .article-page .container {
    max-width: 100%;
    padding-inline: 0;
  }
  
  /* Article container (Template C): centered reading column */
  .article-container {
    max-width: var(--article-max, 720px);
    margin-inline: auto;
    padding-inline: var(--desktop-margin, 32px);
  }
  
  /* Container: restore 1200px max on desktop */
  .container {
    max-width: var(--container-max, 1200px);
    padding-inline: var(--desktop-margin, 32px);
  }
  
  /* Article body: comfortable reading typography */
  .article-body {
    font-size: 18px;
    line-height: var(--lh-relaxed, 1.6);
  }
  
  /* Bottom nav: hidden on desktop */
  .bottom-nav,
  nav.bottom-nav,
  .bottom-nav.mobile-only {
    display: none !important;
  }
  
  /* Body: no bottom padding needed */
  body {
    padding-bottom: 0;
  }
}

/* === SHARED (all viewports) — non-layout mobile fixes === */

/* Header: sticky, proper height */
.site-header {
  height: auto !important;
  min-height: 52px;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.site-header .container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: auto !important;
  min-height: 40px;
  padding: 0 16px;
}

/* Theme toggle */
.theme-toggle,
#themeToggle,
#theme-toggle {
  min-width: 36px;
  min-height: 36px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

.theme-toggle:hover,
#themeToggle:hover,
#theme-toggle:hover {
  background: var(--bg-soft);
}

/* Price ticker */
.price-ticker,
.ticker-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

.ticker-inner,
.price-ticker .container {
  display: inline-flex;
  gap: 16px;
  padding: 4px 16px;
  white-space: nowrap;
}

.ticker-item,
.price-ticker span {
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bottom nav (mobile only) */
@media (max-width: 767px) {
.bottom-nav,
nav.bottom-nav,
.bottom-nav.mobile-only {
  display: flex !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
  min-height: 52px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
}

.bottom-nav a,
.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
  transition: color var(--transition-fast);
  min-width: 44px;
}

.bottom-nav a svg,
.bottom-nav__item svg {
  width: 20px;
  height: 20px;
}

/* Hero image responsive */
.article-hero-image img,
.article-hero img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* TOC list style */
.article-toc ul,
.toc ul {
  list-style: disc;
  padding-left: 20px;
}

.article-toc li,
.toc li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Mobile-only utility */
.mobile-only { display: block; }
@media (min-width: 768px) { .mobile-only { display: none; } }

/* === OMEGA X FIX: Compound selector for Template C & D === */
/* Problem: .container (max-width:1200px) overrides .article-container (max-width:680px)
   when both classes are on the same element (Template C & D).
   Fix: .container.article-container has specificity 0,2,0 — beats both single-class rules. */

/* Base: article width wins */
.container.article-container {
  max-width: var(--article-max, 680px);
}

/* Desktop: centered reading column */
@media (min-width: 768px) {
  .container.article-container {
    max-width: var(--article-max, 680px);
    margin-inline: auto;
    padding-inline: var(--desktop-margin, 32px);
  }
}

/* Mobile: full width */
@media (max-width: 767px) {
  .container.article-container {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
}
/* === END OMEGA X FIX === */
/* === OMEGA X: Missing component styles === */

/* Sidebar */
.sidebar {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-top: var(--space-4);
}

/* Nav items (generic) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition-fast);
}
.nav-item:hover, .nav-item.active {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

/* Page header */
.page-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--text-primary);
  margin: 0;
}

/* Main content area */
.main {
  display: block;
  min-height: 60vh;
}

/* Primary button variant */
.btn-primary, .btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-blue);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}
.btn-primary:hover, .btn--primary:hover {
  background: var(--brand-blue-hover);
  transform: translateY(-1px);
}

/* Ghost button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}
.btn-ghost:hover {
  background: var(--bg-soft);
  border-color: var(--brand-blue);
}

/* Admin stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.stat-label {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--text-primary);
}
.stat-change {
  font-size: var(--fs-caption);
  margin-top: 4px;
}
.stat-change.up { color: var(--green-up); }
.stat-change.down { color: var(--red-down); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-ai, .badge-published { background: var(--brand-blue-soft); color: var(--brand-blue); }
.badge-crypto { background: rgba(247, 147, 26, 0.1); color: #F7931A; }
.badge-finance { background: rgba(16, 185, 129, 0.1); color: var(--green-up); }
.badge-trending { background: rgba(245, 158, 11, 0.1); color: var(--amber); }

/* Form elements */
.form-group { margin-bottom: var(--space-3); }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text-primary);
  transition: var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.form-row > .form-group { flex: 1; }

/* Checklist */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
}
.checklist-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-up);
  color: #fff;
  font-size: 12px;
}
.checklist-item.done .checklist-icon {
  background: var(--green-up);
}

/* Author box info */
.author-box__info {
  flex: 1;
}
.author-box__info h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.author-box__info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Visually-hidden (screen reader only) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* === END OMEGA X: Missing component styles === */
/* === OMEGA X: Table responsive overflow === */
.article-content table,
.article-body table,
.article-container table,
.article-page table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-collapse: collapse;
}
.article-content th,
.article-content td,
.article-body th,
.article-body td,
.article-container th,
.article-container td,
.article-page th,
.article-page td {
  min-width: 80px;
  white-space: normal;
  word-break: break-word;
}
/* === END OMEGA X: Table responsive === */
/* === OMEGA X: Footer social links === */
.footer-social {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.footer-social h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.social-links {
  display: flex;
  gap: 12px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition-fast);
}
.social-links a:hover {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}
.form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}
.contact-form-section {
  max-width: 600px;
  margin: var(--space-5) auto;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
/* === END OMEGA X: Footer social === */

/* === NEXUS ABSOLUTE: dark-mode contrast fixes (S03-06) — dark text on lightened accents === */
[data-theme="dark"] .read-next { color: #1E1B4B; }
[data-theme="dark"] .btn--primary { color: #1E1B4B; }
[data-theme="dark"] .btn--primary:hover { color: #1E1B4B; }
[data-theme="dark"] .checklist-icon { color: #052E16; }
[data-theme="dark"] .skip-link { color: #1E1B4B; }
[data-theme="dark"] .read-next a, [data-theme="dark"] .read-next * { color: inherit; }

/* === NEXUS ABSOLUTE: legal-page table overflow protection (S03-08) === */
.legal-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 767px) { .legal-content { overflow-x: hidden; } }
