/* ============================================================
   blog-detail.css — ORA Technology · Article Detail Page
   Refined / Subtle edition — clean, editorial, low-distraction
   ============================================================ */

/* ── SCOPED RESET ── */
.toc-sidebar nav,
.toc-sidebar ul,
.toc-sidebar li {
  all: unset;
  display: block;
}

/* ── READING PROGRESS BAR ── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1000;
  background: transparent;
}
.read-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  opacity: 0.5;
  transition: width 0.1s linear;
}

/* ══════════════════════════════════════════════════════════
   ARTICLE HERO
══════════════════════════════════════════════════════════ */
.article-hero {
  position: relative;
  z-index: 10;
  padding-top: 72px;
  background: var(--s);
  overflow: hidden;
}

.article-hero .hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.article-hero .hero-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: 0.18;
  mix-blend-mode: overlay;
}

.article-hero .hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 120% 100% at 50% 50%,
    transparent 55%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* Glows — extremely subtle */
.ah-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.ah-glow-1 {
  width: 700px;
  height: 600px;
  top: -200px;
  left: -150px;
  background: radial-gradient(ellipse, rgba(255, 107, 0, 0.035) 0%, transparent 65%);
  filter: blur(90px);
  animation: glow-a 18s ease-in-out infinite alternate;
}
.ah-glow-2 {
  width: 500px;
  height: 500px;
  top: -50px;
  right: -100px;
  background: radial-gradient(ellipse, rgba(255, 107, 0, 0.02) 0%, transparent 65%);
  filter: blur(110px);
  animation: glow-b 24s ease-in-out infinite alternate;
}
@keyframes glow-a {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes glow-b {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-40px, 50px) scale(1.08); }
}

/* Hero inner */
.article-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
.breadcrumb a        { color: var(--w22); transition: color 0.2s; }
.breadcrumb a:hover  { color: var(--w50); }
.breadcrumb span     { color: var(--w38); }
.breadcrumb svg      { color: var(--w12); flex-shrink: 0; }

/* ── META ROW ── */
.ah-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.ah-cat {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--w50);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--w06);
  border: 1px solid var(--w08);
  padding: 0.22rem 0.7rem;
  border-radius: 4px;
}
.ah-sep  { color: var(--w12); font-size: 0.75rem; }
.ah-date,
.ah-read { font-size: 0.74rem; color: var(--w22); font-family: var(--mono); }

/* ── H1 ── */
.article-hero-inner h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--white);
}
.article-hero-inner h1 em {
  font-style: normal;
  color: var(--primary);
  opacity: 1;
}

/* ── SUBTITLE ── */
.ah-subtitle {
  font-size: 1rem;
  color: var(--w38);
  line-height: 1.8;
  font-weight: 300;
  max-width: 660px;
  margin: 0;
}

/* ── AUTHOR ROW ── */
.ah-author-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.ah-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--w06);
  color: var(--w50);
  border: 1px solid var(--w12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.ah-author-info  { display: flex; flex-direction: column; gap: 0.15rem; }
.ah-author-name  { font-size: 0.85rem; font-weight: 600; color: var(--w50); }
.ah-author-role  { font-size: 0.67rem; color: var(--w22); font-family: var(--mono); }

.ah-share-group  { margin-left: auto; position: relative; }
.ah-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--w08);
  color: var(--w38);
  font-family: var(--font);
  font-size: 0.77rem;
  font-weight: 500;
  padding: 0.48rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.ah-share-btn:hover { border-color: var(--w22); color: var(--w60, var(--w50)); }
.share-toast {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #111;
  border: 1px solid var(--w12);
  color: var(--w50);
  font-size: 0.68rem;
  font-family: var(--mono);
  padding: 0.36rem 0.78rem;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}
.share-toast.visible { opacity: 1; transform: translateY(0); }

/* ── HERO IMAGE ── */
.ah-hero-image {
  position: relative;
  border-radius: 14px 14px 0 0;
  /* No overflow:hidden / fixed height / aspect-ratio —
     let the image set its own natural height so nothing is ever cut */
  margin-top: 0.5rem;
}
.ah-hero-gradient {
  width: 100%;
  background: #111;
  position: relative;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
/* Real <img> inside hero — natural height, zero cropping */
.ah-hero-gradient img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.9) brightness(0.95);
}
.ah-hero-emoji {
  font-size: 8rem;
  position: relative;
  z-index: 2;
  animation: float-hero 9s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  opacity: 0.8;
}
@keyframes float-hero {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-12px) rotate(1deg); }
}
.ah-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(5, 5, 5, 0.8) 100%);
}
.ah-hero-chips {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  z-index: 3;
}
.ah-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  border: 1px solid var(--w06);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--w38);
  padding: 0.26rem 0.68rem;
  border-radius: 100px;
}
.ah-chip span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--w22);
}

/* ── REVEAL ANIMATIONS ── */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-reveal] {
  opacity: 0;
  animation: reveal-up 0.5s cubic-bezier(0.22, 0.68, 0, 1.1) forwards;
}
[data-reveal="0"] { animation-delay: 0.1s; }
[data-reveal="1"] { animation-delay: 0.22s; }
[data-reveal="2"] { animation-delay: 0.34s; }
[data-reveal="3"] { animation-delay: 0.46s; }
[data-reveal="4"] { animation-delay: 0.58s; }
[data-reveal="5"] { animation-delay: 0.7s;  }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════════════════
   ARTICLE LAYOUT
══════════════════════════════════════════════════════════ */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 0;
  background: #080808;
  min-height: 60vh;
  position: relative;
  z-index: 1;
  align-items: start;
}

/* ══════════════════════════════════════════════════════════
   TOC SIDEBAR (LEFT)
══════════════════════════════════════════════════════════ */
.toc-sidebar {
  border-right: 1px solid var(--w06);
  background: #090909;
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 1;
}
.toc-sidebar::-webkit-scrollbar       { width: 2px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--w06); border-radius: 2px; }

.toc-inner {
  position: static;
  padding: 2rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--lm-bg);
}
.toc-label {
  font-family: var(--mono);
  font-size: 0.57rem;
  color: var(--w22);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}
.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  width: 100%;
  position: static;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.toc-link {
  display: block;
  font-size: 0.76rem;
  color: var(--w22);
  padding: 0.46rem 0.68rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
}
.toc-link:hover    { color: var(--w50); background: var(--w03); }
.toc-link.active   {
  color: var(--w70);
  border-left-color: var(--w38);
  background: var(--w03);
  font-weight: 500;
}

/* Progress */
.toc-progress-wrap  { margin-top: 0.5rem; width: 100%; }
.toc-progress-label {
  font-size: 0.57rem;
  color: var(--w12);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.toc-progress-bar {
  height: 2px;
  background: var(--w06);
  border-radius: 2px;
  overflow: hidden;
}
.toc-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--w38);
  border-radius: 2px;
  transition: width 0.15s ease;
}
.toc-progress-pct {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--w22);
  margin-top: 0.3rem;
}

/* ══════════════════════════════════════════════════════════
   ARTICLE CONTENT (CENTER)
══════════════════════════════════════════════════════════ */
.article-content {
  padding: 50px 48px 60px 56px;
  max-width: 860px;
  margin: 0 auto;
  min-width: 0;
  align-self: start;
}

/* ── SECTIONS ── */
.article-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: calc(72px + 2rem);
}

/* ── H2 ── */
.article-content h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 1.1rem;
  margin-top: 0;
  padding-top: 0.75rem;
  position: relative;
}
.article-content h2::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--w22);
  border-radius: 2px;
  margin-bottom: 0.85rem;
}

/* ── LEAD PARAGRAPH ── */
.lead-paragraph {
  font-size: 1.02rem;
  color: var(--lm-body) !important;
  line-height: 1.9;
  font-weight: 300;
  margin: 0;
}

/* ── BODY TEXT ── */
.article-content p {
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--w38);
  margin-bottom: 1.3rem;
  font-weight: 300;
}
.article-content p strong {
  color: var(--w60, var(--w50));
  font-weight: 600;
}

/* ── LISTS ── */
.article-content ul {
  padding-left: 0;
  margin: 0 0 1.3rem 0;
  list-style: none;
}
.article-content ul li {
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--w38);
  font-weight: 300;
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.45rem;
  /* prevent text from overflowing the container */
  overflow-wrap: break-word;
  word-break: break-word;
}
.article-content ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--w22);
  font-weight: 400;
  line-height: 1.9;
  flex-shrink: 0;
}
/* Remove bold from strong inside list items */
.article-content ul li strong {
  color: inherit;
  font-weight: 400;
}

/* ── CALLOUT BOXES ── */
.article-callout {
  display: flex;
  gap: 1rem;
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-left: 2px solid var(--w22);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.25rem;
  margin: 1.4rem 0;
}
.callout-info {
  background: #0c0d0f;
  border-color: var(--w06);
  border-left-color: var(--w22);
}
.callout-highlight {
  background: #0f0f0d;
  border-left-color: var(--w38);
}
.callout-icon  { font-size: 1.15rem; flex-shrink: 0; line-height: 1.7; opacity: 0.5; }
.callout-body  { font-size: 0.865rem; color: var(--w38); line-height: 1.75; }
.callout-body strong {
  color: var(--w50);
  display: block;
  margin-bottom: 0.28rem;
  font-weight: 600;
}

/* ── STAT GRID ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1.5rem 0;
}
.stat-box {
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 10px;
  padding: 1.15rem 0.85rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-box:hover { border-color: var(--w12); transform: translateY(-2px); }
.stat-num   { font-size: 1.55rem; font-weight: 700; color: var(--w50); line-height: 1; margin-bottom: 0.4rem; }
.stat-label { font-size: 0.58rem; color: var(--w22); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--mono); }

/* ── ARTICLE FIGURE — FIXED ── */
.article-figure {
  margin: 1.75rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--w06);
  /* aspect-ratio keeps proportions on every screen size;
     no more arbitrary fixed height that crops the subject */
  aspect-ratio: 16 / 7;
}
.article-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;   /* anchors to top so faces/subjects stay visible */
  display: block;
  transition: transform 0.6s ease;
  filter: saturate(0.85) brightness(0.93);
}
.article-figure:hover img { transform: scale(1.012); }
.article-figure figcaption {
  padding: 0.78rem 1rem;
  background: #0c0c0c;
  font-size: 0.74rem;
  color: var(--w22);
  font-style: italic;
  border-top: 1px solid var(--w06);
  line-height: 1.55;
}

/* ── COMPANY / STEP LIST ── */
.company-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.4rem 0;
}
.company-card {
  display: flex;
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.company-card:hover    { border-color: var(--w12); transform: translateX(3px); }
.company-card.rank-1   { border-color: var(--w08); background: #101010; }
.company-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  align-self: stretch;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--w22);
  background: var(--w03);
  border-right: 1px solid var(--w06);
  letter-spacing: 0.04em;
}
.company-card.rank-1 .company-rank { color: var(--w38); }
.company-body {
  flex: 1;
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.company-header { display: flex; align-items: center; gap: 0.75rem; }
.company-icon   { font-size: 1.4rem; flex-shrink: 0; opacity: 0.65; }
.company-name   { font-size: 0.92rem; font-weight: 700; color: var(--w70); line-height: 1.2; }
.company-meta   { font-size: 0.65rem; color: var(--w22); font-family: var(--mono); margin-top: 0.08rem; }
.company-badge {
  margin-left: auto;
  font-size: 0.55rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.58rem;
  border-radius: 100px;
  border: 1px solid var(--w06);
  color: var(--w22);
  white-space: nowrap;
}
.company-desc {
  font-size: 0.82rem;
  color: var(--w38);
  line-height: 1.65;
  margin: 0;
  font-weight: 300;
}
.company-tags { display: flex; flex-wrap: wrap; gap: 0.32rem; }
.company-tags span {
  font-family: var(--mono);
  font-size: 0.57rem;
  color: var(--w38);
  background: var(--w06);
  border: 1px solid var(--w06);
  padding: 0.14rem 0.52rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ── EMERGING GRID ── */
.emerging-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1.4rem 0;
}
.emerging-card {
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 10px;
  padding: 1.2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.emerging-card:hover  { border-color: var(--w12); transform: translateY(-2px); }
.emerging-icon        { font-size: 1.5rem; margin-bottom: 0.6rem; opacity: 0.6; }
.emerging-card h4     { font-size: 0.88rem; font-weight: 700; color: var(--w70); margin-bottom: 0.42rem; }
.emerging-card p      { font-size: 0.79rem; color: var(--w38); line-height: 1.65; margin: 0; font-weight: 300; }

/* ── SECTOR LIST ── */
.sector-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin: 1.4rem 0;
}
.sector-item {
  display: flex;
  gap: 1.1rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--w06);
}
.sector-item:last-child { border-bottom: none; }
.sector-num {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--w08);
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  padding-top: 0.2rem;
}
.sector-content        { flex: 1; }
.sector-content h4     { font-size: 0.92rem; font-weight: 700; color: var(--w70); margin-bottom: 0.42rem; }
.sector-content p      { font-size: 0.81rem; color: var(--w38); line-height: 1.65; margin-bottom: 0.65rem; font-weight: 300; }
.sector-bar            { height: 2px; background: var(--w06); border-radius: 2px; overflow: hidden; }
.sector-fill {
  height: 100%;
  width: var(--w, 0%);
  background: var(--w22);
  border-radius: 2px;
  animation: bar-fill 1.6s 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes bar-fill {
  from { width: 0%; }
  to   { width: var(--w); }
}

/* ── OUTLOOK CARDS ── */
.outlook-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1.4rem 0;
}
.outlook-card {
  border-radius: 10px;
  padding: 1.3rem;
  border: 1px solid var(--w06);
  background: #0d0d0d;
}
.outlook-positive { background: #0c0e0d; }
.outlook-caution  { background: #0f0e0c; }
.outlook-icon     { font-size: 1.3rem; margin-bottom: 0.6rem; opacity: 0.55; }
.outlook-card h4  { font-size: 0.88rem; font-weight: 700; color: var(--w70); margin-bottom: 0.7rem; }
.outlook-card ul  {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin: 0;
}
.outlook-card ul li {
  font-size: 0.79rem;
  color: var(--w38);
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
  font-weight: 300;
}
.outlook-card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--w22);
  font-size: 0.7rem;
}

/* ── TAGS ── */
.article-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1.75rem 0;
  border-top: 1px solid var(--w06);
  margin-top: 0.75rem;
}
.tag-label {
  font-family: var(--mono);
  font-size: 0.57rem;
  color: var(--w22);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tag-pill {
  font-size: 0.7rem;
  color: var(--w38);
  background: var(--w03);
  border: 1px solid var(--w06);
  padding: 0.24rem 0.68rem;
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.tag-pill:hover { color: var(--w60, var(--w50)); border-color: var(--w22); }

/* ── AUTHOR BIO ── */
.author-bio {
  display: flex;
  gap: 1.3rem;
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2rem 0;
  align-items: flex-start;
}
.author-bio-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--w06);
  color: var(--w38);
  border: 1px solid var(--w08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}
.author-bio-content    { flex: 1; }
.author-bio-name       { font-size: 0.92rem; font-weight: 700; color: var(--w70); margin-bottom: 0.16rem; }
.author-bio-role       { font-size: 0.66rem; color: var(--w22); font-family: var(--mono); margin-bottom: 0.75rem; letter-spacing: 0.04em; }
.author-bio-content p  { font-size: 0.84rem; color: var(--w38); line-height: 1.7; margin-bottom: 0.75rem; font-weight: 300; }
.author-bio-links      { display: flex; gap: 1rem; }
.author-bio-links a    { font-size: 0.78rem; color: var(--w38); font-weight: 500; transition: color 0.2s; }
.author-bio-links a:hover { color: var(--w60, var(--w50)); }

/* ── BACK TO BLOG ── */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  color: var(--w38);
  font-size: 0.81rem;
  font-weight: 500;
  padding: 0.62rem 1.2rem;
  border: 1px solid var(--w08);
  border-radius: 6px;
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
  margin-top: 0.5rem;
}
.back-to-blog:hover        { border-color: var(--w22); color: var(--w60, var(--w50)); }
.back-to-blog svg          { transition: transform 0.2s; }
.back-to-blog:hover svg    { transform: translateX(-3px); }

/* ══════════════════════════════════════════════════════════
   RELATED SIDEBAR (RIGHT)
══════════════════════════════════════════════════════════ */
.related-sidebar {
  padding: 2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-self: start;
}

/* Share panel */
.share-panel {
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 10px;
  padding: 1.15rem;
  position: sticky;
  top: calc(72px + 1.5rem);
}
.share-panel-label {
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--w22);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.share-btns    { display: flex; flex-direction: column; gap: 0.38rem; }
.share-icon-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--w06);
  border-radius: 6px;
  color: var(--w38);
  font-family: var(--font);
  font-size: 0.77rem;
  font-weight: 400;
  padding: 0.56rem 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  width: 100%;
  text-align: left;
}
.share-icon-btn:hover { border-color: var(--w22); color: var(--w60, var(--w50)); }

/* Related label */
.related-label {
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--w22);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: -0.75rem;
}
.related-articles { display: flex; flex-direction: column; gap: 0.8rem; }
.related-card {
  display: flex;
  gap: 0.72rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 9px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--w12); transform: translateX(2px); }
.related-thumb {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0.65;
}
.related-body  { flex: 1; min-width: 0; }
.related-cat {
  font-family: var(--mono);
  font-size: 0.5rem;
  color: var(--w22);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.22rem;
}
.related-card h5 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--w50);
  line-height: 1.4;
  margin-bottom: 0.26rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.related-card:hover h5 { color: var(--w70); }
.related-read          { font-family: var(--mono); font-size: 0.56rem; color: var(--w12); }

/* Newsletter CTA */
.newsletter-cta {
  background: #0d0d0d;
  border: 1px solid var(--w06);
  border-radius: 10px;
  padding: 1.15rem;
  position: sticky;
  top: calc(62px + 16rem);
}
.newsletter-cta-icon { font-size: 1.65rem; margin-bottom: 0.6rem; opacity: 0.55; }
.newsletter-cta h4   { font-size: 0.9rem; font-weight: 700; color: var(--w70); margin-bottom: 0.32rem; }
.newsletter-cta p    { font-size: 0.77rem; color: var(--w38); line-height: 1.6; margin-bottom: 0.85rem; font-weight: 300; }
.newsletter-form     { display: flex; flex-direction: column; gap: 0.42rem; }
.newsletter-form input {
  background: var(--w03);
  border: 1px solid var(--w08);
  border-radius: 6px;
  padding: 0.58rem 0.82rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input::placeholder { color: var(--w12); }
.newsletter-form input:focus        { border-color: var(--w22); }
.newsletter-form button {
  padding: 0.72rem 1.1rem;
  background: var(--w08);
  color: var(--w70);
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--w12);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.newsletter-form button:hover {
  background: var(--w12);
  color: var(--white);
  border-color: var(--w22);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .article-layout  { grid-template-columns: 220px 1fr 250px; }
  .article-content { padding: 3rem 2.5rem 5rem; }
}
@media (max-width: 1100px) {
  .article-layout  { grid-template-columns: 200px 1fr; }
  .related-sidebar { display: none; }
}
@media (max-width: 900px) {
  .article-layout  { grid-template-columns: 1fr; }
  .toc-sidebar {
    position: static;
    height: auto;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--w06);
  }
  .toc-inner {
    position: static;
    padding: 1.4rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .toc-nav  { flex-direction: row; flex-wrap: wrap; gap: 0.32rem; }
  .toc-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 4px;
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
  }
  .toc-link.active   { border-left: none; border-bottom-color: var(--w38); }
  .toc-progress-wrap { display: none; }
  .article-content   { padding: 2rem 1.5rem 4rem; }
  .stat-grid         { grid-template-columns: 1fr 1fr; }
  .emerging-grid     { grid-template-columns: 1fr; }
  .outlook-cards     { grid-template-columns: 1fr; }
  /* Slightly taller crop on tablet so image has breathing room */
  .article-figure    { aspect-ratio: 16 / 8; }
}
@media (max-width: 640px) {
  .article-hero-inner    { padding: 2rem 1.2rem 0; }
  /* Hero image is naturally sized — no override needed on mobile */  .ah-hero-emoji         { font-size: 5.5rem; }
  .article-hero-inner h1 { font-size: 1.85rem; }
  .ah-share-group        { margin-left: 0; }
  .ah-author-row         { gap: 0.7rem; }
  .stat-grid             { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .company-rank          { width: 42px; font-size: 0.7rem; }
  .ah-hero-chips         { display: none; }
  /* Article figure on mobile: taller ratio so image isn't squashed */
  .article-figure        { aspect-ratio: 3 / 2; }
  .author-bio            { flex-direction: column; }
  .article-content       { padding: 1.5rem 1rem 3rem; }
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.article-content code {
  font-family: 'Space Mono', monospace;
  font-size: 0.79em;
  background: var(--w06);
  color: var(--w50);
  padding: 0.13em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--w08);
}
pre.code-block {
  background: #0a0a0a;
  border: 1px solid var(--w06);
  border-left: 2px solid var(--w22);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
  margin: 1.4rem 0;
  position: relative;
}
pre.code-block code {
  font-family: 'Space Mono', monospace;
  font-size: 0.79rem;
  line-height: 1.8;
  color: var(--w50);
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

/* Light mode overrides */
html[data-theme="light"] pre.code-block {
  background: #f8f8f8 !important;
  border-color: rgba(0,0,0,0.06) !important;
  border-left-color: rgba(0,0,0,0.18) !important;
}
html[data-theme="light"] pre.code-block code { color: #444 !important; }
html[data-theme="light"] .article-content code {
  background: rgba(0,0,0,0.04) !important;
  color: #555 !important;
  border-color: rgba(0,0,0,0.07) !important;
}