/* =====================================================================
   Tales From The Crypto Blog — theme
   Mobile-first, modern "crypto dashboard" aesthetic. Dark base with a
   single accent color; charts and tables reflow to full width on small
   screens so Chart.js canvases stay legible on phones.
   ===================================================================== */

:root {
  --bg: #0b0f19;
  --bg-elevated: #131a2b;
  --bg-card: #161f33;
  --border: #232d45;
  --text: #e7ebf3;
  /* Was a dimmer grey (#8b96b5) for de-emphasized text (nav links, post
     excerpts, dates, disclaimers, etc.) -- raised to match --text so all of
     that reads as white/near-white against the dark background instead of
     low-contrast grey. Every rule using var(--text-muted) picks this up
     automatically. */
  --text-muted: #e7ebf3;
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --pos: #34d399;
  --neg: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Licensed display font used ONLY for the header brand name (.brand__name
   below) -- matches the site's "Tales From The Crypto" wordmark logo.
   Self-hosted (public/assets/fonts/), not Google Fonts -- no CSP/
   preconnect changes needed, files are same-origin. woff2 first (smaller,
   universally supported by anything modern enough to matter), woff as the
   fallback for anything older. */
@font-face {
  font-family: 'MonsterFromTheCrypt';
  src: url('/assets/fonts/monster-from-the-crypt.woff2') format('woff2'),
       url('/assets/fonts/monster-from-the-crypt.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__name {
  font-family: 'MonsterFromTheCrypt', var(--font);
  /* Not font-weight:800 -- this display font has no bold variant, and
     browsers "faking" bold on a font like this blurs/distorts the
     letterforms. Normal weight + the font's own character does the work. */
  font-weight: normal;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a { color: var(--text-muted); font-weight: 600; font-size: 14px; }
.main-nav a:hover { color: var(--text); text-decoration: none; }

.lang-switch { display: flex; gap: 4px; background: var(--bg-card); border-radius: 8px; padding: 3px; border: 1px solid var(--border); }
.lang-switch__btn { padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--text-muted); border-radius: 6px; }
.lang-switch__btn:hover { text-decoration: none; color: var(--text); }
.lang-switch__btn.is-active { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 26px 0 18px; text-align: center; }
.hero h1 { font-size: clamp(24px, 4vw, 38px); margin: 0 0 6px; letter-spacing: -0.03em; }
.hero__pulse { color: var(--pos); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.hero__tagline { font-size: 16px; color: var(--text-muted); margin: 0 0 4px; }
.hero__meta { font-size: 13px; color: var(--text-muted); }

/* ---------- post feed / cards ---------- */
.post-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 20px 20px 40px; }
.post-feed__ad { grid-column: 1 / -1; }
.post-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.15s ease, border-color 0.15s ease;
  padding-top: 20px;
}
.post-card:has(.post-card__banner) { padding-top: 0; }
.post-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.post-card__link { display: block; color: var(--text); }
.post-card__link:hover { text-decoration: none; }
.post-card__banner { margin: 0 0 14px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.post-card__banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__link > *:not(.post-card__banner) { margin-left: 20px; margin-right: 20px; }
.post-card__link > .post-card__meta { margin-bottom: 20px; display: block; }
.post-card__coin img { border-radius: 50%; display: block; }
.post-card__topline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.post-card__topline .badge { margin-bottom: 0; }
.post-card__topline .badge--win { font-size: 15px; padding: 9px 16px; gap: 6px; }

/* Same "badge + coin icon" pairing as .post-card__topline above, sized up
   slightly for the full post page. */
.post__topline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.post__topline .badge { margin-bottom: 0; }
/* Now a link to that coin's own page (public/coin.php) -- one per coin the
   post actually covers, not just the primary symbol. */
.post__topline-coin { display: block; line-height: 0; transition: transform 0.15s ease; }
.post__topline-coin:hover { transform: scale(1.08); }
.post__topline-coin img { border-radius: 50%; display: block; }
.post-card h2 { font-size: 17px; margin: 6px 0 8px; line-height: 1.35; }
.post-card p { font-size: 14px; color: var(--text-muted); margin: 0 0 10px; }
.post-card__meta { font-size: 12px; color: var(--text-muted); }

/* featured/hero card: latest post, spans the full row width (two items
   wide in this grid's usual desktop layout), bigger banner + title */
.post-card--featured { grid-column: 1 / -1; }
.post-card--featured .post-card__banner { aspect-ratio: 21 / 9; }
.post-card--featured h2 { font-size: 24px; line-height: 1.25; margin: 8px 0 8px; }
.post-card--featured p { font-size: 15px; }
@media (max-width: 640px) {
  .post-card--featured .post-card__banner { aspect-ratio: 16 / 9; }
  .post-card--featured h2 { font-size: 20px; }
}

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; margin-bottom: 8px;
}
a.badge:hover { text-decoration: none; filter: brightness(1.15); }
.badge--win { background: rgba(52, 211, 153, 0.15); color: var(--pos); }
.badge--lg { font-size: 13px; padding: 6px 12px; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ---------- pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 20px; align-items: center; padding: 20px 0 50px; color: var(--text-muted); font-size: 14px; }

/* ---------- article ---------- */
.post { padding: 30px 20px 20px; max-width: 760px; }
.post h1 { font-size: clamp(24px, 4vw, 36px); line-height: 1.3; margin: 8px 0 12px; letter-spacing: -0.02em; }
.post__meta { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.early-access-flag { display: inline-block; background: rgba(124, 92, 255, 0.15); color: var(--accent-2); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-bottom: 12px; }

/* author byline/persona -- AUTHOR_BYLINE_NAME, see public/post.php + task #48 */
.post__byline { font-size: 13px; color: var(--text-muted); margin: -4px 0 10px; }
.post__byline a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); }
.post__byline a:hover { color: var(--text); }

.post__body { font-size: 17px; }
.post__body h2 { font-size: 22px; margin: 36px 0 12px; }
.post__body h3 { font-size: 18px; margin: 28px 0 10px; color: var(--text); }
.post__body p { margin: 0 0 18px; color: #d3d9ea; }
.post__body ul, .post__body ol { margin: 0 0 18px; padding-left: 22px; color: #d3d9ea; }
.post__body a[target="_blank"]::after { content: " ↗"; font-size: 0.8em; }
.post__body a.inline-followup-link { color: var(--pos); font-weight: 600; text-decoration-color: rgba(52, 211, 153, 0.4); }
.post__body a.inline-followup-link:hover { text-decoration-color: var(--pos); }

/* auto-inserted affiliate links (see includes/affiliate_links.php) --
   deliberately styled the same as a normal in-body link (not called out
   visually) since the disclosure notice above the article already
   discloses their presence per post. */
.post__body a.affiliate-link { color: inherit; text-decoration-color: rgba(212, 175, 55, 0.4); }
.post__body a.affiliate-link:hover { text-decoration-color: var(--accent, #d4af37); }

/* per-post "contains a referral link" disclosure -- only rendered when
   data_json.affiliate_programs is non-empty for that specific post, see
   public/post.php. Same visual weight as .fallback-notice. */
.post__affiliate-disclosure {
  font-size: 13px; color: var(--text-muted); background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 16px;
}

/* chart embeds inside article body */
.post-chart {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 24px 0; position: relative;
}
.post-chart canvas { width: 100% !important; height: 220px !important; }
.post-chart::before {
  content: attr(data-symbol); display: block; font-weight: 800; font-size: 13px;
  color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.04em;
}

/* inline featured-image embed, dropped roughly halfway down the article --
   see includes/functions.php::injectMidArticleImage() */
.post-inline-image { margin: 28px 0; }
.post-inline-image img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--border);
}

/* references */
.references { margin: 28px 0; padding: 16px 18px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }
.references h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.references ul { margin: 0; padding-left: 18px; }
.references li { margin-bottom: 6px; font-size: 14px; }

/* predictions */
.predictions { margin: 32px 0; }
.predictions__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.prediction-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.prediction-card__symbol { display: block; font-weight: 800; font-size: 15px; }
.prediction-card__horizon { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.prediction-card__dir { display: inline-block; font-weight: 700; font-size: 14px; padding: 2px 0; }
.prediction-card__dir--up { color: var(--pos); }
.prediction-card__dir--down { color: var(--neg); }
.prediction-card__dir--flat { color: var(--warn); }
.prediction-card__confidence { display: block; font-size: 11px; color: var(--text-muted); margin: 6px 0; text-transform: uppercase; letter-spacing: 0.04em; }
.prediction-card__rationale { font-size: 13px; color: #c3cbe0; margin: 6px 0 0; }

/* summary table */
.summary-table { margin: 32px 0; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--bg-card); }
th, td { text-align: left; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Let the "Why" column wrap onto multiple lines instead of forcing the
   whole table into horizontal-scroll mode -- every other column here is
   short (symbol/price/pct/verdict), so only the reason text needs this
   override from the global nowrap rule above. */
.summary-table td:last-child,
.summary-table th:last-child {
  white-space: normal;
  min-width: 220px;
}
/* td.cell-coin stays a normal table-cell (not display:flex) so it keeps
   participating in table row layout -- otherwise, once the "Why" column
   wraps onto multiple lines and rows grow taller, a flex td stops
   stretching to the row's full height and the row--buy/avoid/watch
   left-border accent (below) only covers the icon+symbol's own height,
   looking visually disconnected from the rest of the taller row. The
   flex layout instead lives on this inner wrapper span. */
td.cell-coin { vertical-align: middle; font-weight: 700; }
td.cell-coin .cell-coin__inner { display: flex; align-items: center; gap: 8px; }
td.cell-coin img { border-radius: 50%; }
td.pos { color: var(--pos); font-weight: 700; }
td.neg { color: var(--neg); font-weight: 700; }
tr.row--buy td:first-child { border-left: 3px solid var(--pos); }
tr.row--avoid td:first-child { border-left: 3px solid var(--neg); }
tr.row--watch td:first-child { border-left: 3px solid var(--warn); }

/* related posts */
.related-posts { margin: 40px 0; }
.related-posts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related-posts li { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }

/* ---------- ad units ---------- */
.ad-unit { margin: 28px 0; text-align: center; min-height: 90px; }
.ad-unit__label::before {
  content: "Advertisement"; display: block; font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}

/* ---------- newsletter CTA ---------- */
/* Temporary hide for the nav link + footer opt-in box -- CSS-only rather
   than removing/conditionally-rendering the PHP+HTML, since that's what
   caused a full-page rendering break on talesfromthecrypto.online. This
   way the exact same markup that's confirmed working keeps rendering
   byte-for-byte; only visibility changes. Delete this rule (and the two
   class="is-hidden-temp" attributes in header.php/footer.php) to bring
   both back later. */
.is-hidden-temp { display: none !important; }
.newsletter-cta { background: linear-gradient(135deg, var(--bg-elevated), #0f1526); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 48px 0; margin-top: 40px; }
.newsletter-cta__inner { max-width: 640px; margin: 0 auto; text-align: center; padding: 0 20px; }
.newsletter-cta h2 { font-size: 24px; margin: 0 0 10px; }
.newsletter-cta p { color: var(--text-muted); margin: 0 0 20px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] {
  flex: 1 1 260px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 15px;
}
.newsletter-form button {
  background: var(--accent); color: #fff; border: none; padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 15px; cursor: pointer;
}
.newsletter-form button:hover { background: var(--accent-2); }
.newsletter-form__disclaimer { font-size: 12px; color: var(--text-muted); margin-top: 14px; }
.newsletter-toast { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 0 60px; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.site-footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.site-footer__nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }
.site-footer__nav a { color: var(--text-muted); }
.bmc-button { margin-left: auto; }
.site-footer__disclaimer { flex-basis: 100%; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }
.site-footer__copy { flex-basis: 100%; font-size: 12px; color: var(--text-muted); }

/* ---------- archive ---------- */
.archive { padding: 40px 20px; }
.archive h1 { margin-bottom: 20px; }
.archive-search { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); margin-bottom: 20px; font-size: 15px; }
.archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.archive-list li a { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; color: var(--text); }
.archive-list li a:hover { border-color: var(--accent); text-decoration: none; }
.archive-list__title { flex: 1; font-size: 14px; }
.archive-list__date { font-size: 12px; color: var(--text-muted); }

/* ---------- coin page ---------- */
.coin-page { padding: 40px 20px; }
.coin-page__header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.coin-page__quote { color: var(--text-muted); }

.not-found { text-align: center; padding: 100px 20px; }

/* ---------- about page ---------- */
.about-page { max-width: 640px; margin: 0 auto; padding: 40px 20px 60px; text-align: center; }
.about-page__logo { max-width: 250px; width: 100%; height: auto; margin: 0 auto 24px; display: block; }
.about-page h1 { margin: 0 0 24px; }
.about-page p { text-align: left; color: #d3d9ea; font-size: 16px; line-height: 1.7; margin: 0 0 18px; }

/* ---------- mobile nav toggle ---------- */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; background: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 16px; background: var(--text); margin: 0 auto; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 20px; gap: 14px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav .lang-switch { flex-wrap: wrap; margin-top: 4px; }
  .nav-toggle { display: flex; }
  .site-header { position: sticky; }
  .site-header__inner { padding: 12px 16px; position: relative; }
  .hero { padding: 36px 0 24px; }
  /* Nav logo already shows the site name right above this -- repeating it
     in the hero heading is redundant on a narrow screen where both are
     stacked close together. Tagline + meta line below still show. */
  .hero h1 { display: none; }
  .post { padding: 20px 16px 10px; }
  .newsletter-form { flex-direction: column; }
  .bmc-button { margin-left: 0; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  table { min-width: 480px; }
  .post-chart canvas { height: 180px !important; }
}

/* print-ish / reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero__pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Added: sidebar layout, share bar, language-fallback badges,
   newsletter preference checkboxes, RTL support
   ===================================================================== */

/* ---------- two-column layout (main content + "about" sidebar) ---------- */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 20px;
}
.layout-with-sidebar > .post,
.layout-with-sidebar > .post-feed,
.layout-with-sidebar > .archive,
.layout-with-sidebar > .coin-page {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.layout-with-sidebar > .post-feed { padding-top: 0; padding-bottom: 0; }

.sidebar { position: sticky; top: 84px; }
.sidebar__card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; margin-bottom: 20px;
}
.sidebar__logo { height: 32px; width: auto; margin: 0 auto 14px; display: block; }
.sidebar__pic { border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.sidebar__name { font-size: 16px; margin: 0 0 4px; }
.sidebar__subtitle { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
.sidebar__bio { font-size: 13px; color: #c3cbe0; text-align: left; line-height: 1.6; margin: 0 0 16px; }
.sidebar__bmc-button { display: inline-block; }

/* ---------- sidebar "Latest Outlook" widget ---------- */
/* Its own card, text-align reset to left since .sidebar__card centers
   everything else (the profile bio block above it). */
.sidebar__outlook { text-align: left; }
.sidebar__outlook-title { font-size: 15px; margin: 0 0 4px; text-align: center; }
.sidebar__outlook-updated { font-size: 11px; color: var(--text-muted); margin: 0 0 10px; text-align: center; }
/* Overrides the base `table { min-width: 560px }` (sized for the full
   5-column post-page table) -- this widget only has 3 narrow columns and
   needs to actually fit the 300px desktop sidebar column without forcing
   horizontal scroll. Compact font/padding keeps it "thin" as requested,
   both in the fixed 300px desktop column and the full-width mobile stack. */
.sidebar-outlook-table { min-width: 0; }
.sidebar-outlook-table th, .sidebar-outlook-table td { padding: 6px 8px; font-size: 12px; }
.sidebar-outlook-table th { font-size: 10px; }
/* Caps height rather than truncating rows -- summary_table can have up to
   5 coins per bucket (15 rows total); this keeps the widget visually
   contained regardless of how many rows a given report has. */
.sidebar__outlook-scroll { max-height: 260px; overflow-y: auto; }
.sidebar__outlook-readmore {
  display: block; text-align: center; margin-top: 12px; font-size: 13px; font-weight: 700;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.sidebar__outlook-readmore:hover { background: var(--accent-2); text-decoration: none; }

@media (max-width: 900px) {
  .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
}

/* ---------- share bar (self-hosted, plain links + one JS copy button) --- */
.share-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 20px 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.share-bar__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  cursor: pointer;
}
.share-bar__btn svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.share-bar__btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
/* Copy-link icon toggle (link icon <-> checkmark) -- see site.js.
   The [hidden] override is required: a plain `.share-bar__btn-icon`
   class rule has the SAME specificity as the browser's default
   `[hidden] { display: none }` UA rule, and author styles win ties in
   the cascade -- without this, `display: block` above silently
   cancelled the hidden attribute and both icons rendered at once. */
.share-bar__btn-icon { display: block; }
.share-bar__btn-icon[hidden] { display: none; }
.share-bar__btn.is-copied { background: var(--pos); border-color: var(--pos); color: #06281c; }

/* Visually hidden but still readable by screen readers / link-text SEO
   (used to keep the platform name in the DOM for the icon-only share
   buttons above). */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- language-fallback notices ---------- */
.fallback-notice {
  font-size: 13px; color: var(--warn); background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 8px; padding: 8px 12px; margin-bottom: 16px;
}
.badge--fallback { background: rgba(251, 191, 36, 0.15); color: var(--warn); }

/* ---------- newsletter list-type checkboxes ---------- */
.newsletter-form__opts {
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center;
  font-size: 13px; color: var(--text-muted); flex-basis: 100%; margin: 4px 0;
}
.newsletter-form__opts label { display: flex; align-items: center; gap: 6px; }

/* ---------- preferences page form ---------- */
.prefs-form { margin: 20px 0; display: grid; gap: 10px; }
.prefs-form label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.prefs-form button {
  justify-self: start; background: var(--accent); color: #fff; border: none; padding: 10px 20px;
  border-radius: 10px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.prefs-form button:hover { background: var(--accent-2); }

/* ---------- About page contact form ---------- */
.contact-form { display: grid; gap: 12px; text-align: left; margin: 0 0 12px; }
.contact-form label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 4px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 15px; font-family: inherit;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button {
  justify-self: start; background: var(--accent); color: #fff; border: none; padding: 12px 22px;
  border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.contact-form button:hover { background: var(--accent-2); }
.contact-form__toast { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
/* Honeypot: off-screen (not display:none -- some spam bots specifically
   skip display:none fields) and hidden from assistive tech, so real
   visitors -- including screen reader users -- never perceive or fill it. */
.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- RTL (Arabic) ---------- */
html[dir="rtl"] .site-header__inner { flex-direction: row-reverse; }
html[dir="rtl"] .main-nav { flex-direction: row-reverse; }
html[dir="rtl"] .layout-with-sidebar { direction: rtl; }
html[dir="rtl"] .sidebar__bio { text-align: right; }
html[dir="rtl"] .bmc-button { margin-left: 0; margin-right: auto; }
html[dir="rtl"] tr.row--buy td:first-child,
html[dir="rtl"] tr.row--avoid td:first-child,
html[dir="rtl"] tr.row--watch td:first-child { border-left: none; }
html[dir="rtl"] tr.row--buy td:last-child { border-right: 3px solid var(--pos); }
html[dir="rtl"] tr.row--avoid td:last-child { border-right: 3px solid var(--neg); }
html[dir="rtl"] tr.row--watch td:last-child { border-right: 3px solid var(--warn); }
