/* ==========================================================================
   Promptnote Standard Blog & Article Design System
   ========================================================================== */

:root {
  --article-max: 860px;
  --article-shell-max: 1240px;
  --sidebar-w: 280px;
  --article-gap: 48px;
}

/* Article Shell & Container */
.article-shell,
.blog-container {
  max-width: var(--article-shell-max);
  width: min(var(--article-shell-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 24px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumbs li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumbs li a:hover {
  color: var(--text-primary);
}

.breadcrumbs .current {
  color: #38bdf8;
  font-weight: 500;
}

/* Article Hero Header */
.article-hero,
.article-header {
  margin-bottom: 36px;
}

.article-meta,
.article-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.article-hero h1,
.article-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 18px 0;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.hero-subtitle,
.article-header > p {
  font-size: clamp(1.08rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 960px;
  margin: 0 0 28px 0;
}

/* Header Cards & Author Row */
.article-header-card {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
}

.article-info-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 0.9rem;
}

.author-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(0, 104, 253, 0.25));
  border: 1px solid var(--glass-border-soft);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ==========================================================================
   2-Column Responsive Body Layout (Sidebar TOC + Article Content)
   ========================================================================== */

.article-body,
.article-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--article-gap);
  align-items: start;
  padding-top: 12px;
}

/* Single-column fallback */
.article-body:not(:has(.article-aside)):not(:has(.table-of-contents-wrapper)),
.article-body > .article-main:only-child {
  grid-template-columns: 1fr;
  max-width: var(--article-max);
  margin: 0 auto;
}

/* Sticky Sidebar Table of Contents */
.article-aside,
.table-of-contents-wrapper {
  position: sticky;
  top: 90px;
  order: -1; /* Renders on the left side */
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
  z-index: 5;
}

.article-aside::-webkit-scrollbar,
.table-of-contents-wrapper::-webkit-scrollbar {
  width: 4px;
}

.article-aside::-webkit-scrollbar-thumb,
.table-of-contents-wrapper::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

.toc,
.table-of-contents-wrapper .glass-panel {
  padding: 20px 18px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.toc h2,
.toc h3,
.table-of-contents-wrapper h2,
.table-of-contents-wrapper h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc ul,
[data-toc] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.toc li,
[data-toc] li {
  font-size: 0.88rem;
  line-height: 1.4;
}

.toc li.toc-subitem,
[data-toc] li.toc-subitem {
  padding-left: 12px;
  border-left: 1px solid var(--glass-border-soft);
  margin-left: 6px;
  font-size: 0.82rem;
}

.toc a,
[data-toc] a {
  color: var(--text-secondary);
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
  text-decoration: none;
}

.toc a:hover,
[data-toc] a:hover {
  color: var(--text-primary);
  background: var(--glass-bg-soft);
  transform: translateX(2px);
}

.toc a.active,
[data-toc] a.active {
  color: #38bdf8;
  background: rgba(0, 104, 253, 0.16);
  font-weight: 600;
}

/* Main Article Content Container */
.article-main {
  min-width: 0;
  width: 100%;
}

.article-main article,
.article-content {
  line-height: 1.75;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Article Typography & Elements
   ========================================================================== */

.article-main h2,
.article-content h2 {
  scroll-margin-top: 100px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.25;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  letter-spacing: -0.02em;
}

.article-main h3,
.article-content h3 {
  scroll-margin-top: 100px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.article-main h4,
.article-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.article-main p,
.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 1.4em 0;
}

.article-main p strong,
.article-content p strong,
.article-main li strong,
.article-content li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-main a,
.article-content a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.article-main a:hover,
.article-content a:hover {
  color: #7dd3fc;
}

.article-main ul,
.article-main ol,
.article-content ul,
.article-content ol {
  padding-left: 1.4rem;
  margin: 0 0 1.6em 0;
}

.article-main li,
.article-content li {
  margin-bottom: 0.55em;
  line-height: 1.7;
}

/* Figures & Images */
figure {
  margin: 2.2em 0;
  width: 100%;
}

figure img,
.article-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  display: block;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* Blockquotes */
blockquote,
.article-quote {
  margin: 2em 0;
  padding: 18px 24px;
  border-left: 4px solid #38bdf8;
  background: rgba(0, 104, 253, 0.08);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.7;
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Horizontal Rule */
hr {
  border: 0;
  border-top: 1px solid var(--glass-border);
  margin: 3em 0;
}

/* ==========================================================================
   Badges, Tags, and Pills
   ========================================================================== */

.table-badge,
.platform-tag,
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-badge.primary,
.platform-tag {
  background: rgba(0, 104, 253, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(0, 104, 253, 0.4);
}

.table-badge.accent {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.table-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.table-badge.success {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.table-badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Salary Badges */
.salary-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}
.salary-india { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }
.salary-us { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.salary-eu { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

/* ==========================================================================
   Callout Boxes & Notes
   ========================================================================== */

.callout-box {
  margin: 2em 0;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-soft);
  position: relative;
  overflow: hidden;
  border-left-width: 4px;
}

.callout-box.info { border-left-color: #0068fd; background: rgba(0, 104, 253, 0.08); }
.callout-box.purple { border-left-color: #a855f7; background: rgba(168, 85, 247, 0.08); }
.callout-box.warning { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.08); }
.callout-box.danger { border-left-color: #ff453a; background: rgba(255, 69, 58, 0.08); }
.callout-box.success { border-left-color: #34d399; background: rgba(52, 211, 153, 0.08); }

.callout-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* Key Formula & Takeaways */
.key-formula-card,
.takeaways-box {
  background: linear-gradient(135deg, rgba(0, 104, 253, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(0, 104, 253, 0.35);
  border-left: 4px solid #38bdf8;
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin: 2.2em 0;
}

.takeaways-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.takeaways-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

/* ==========================================================================
   Code Blocks & Prompts
   ========================================================================== */

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: #38bdf8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

pre {
  background: #060913;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 1.8em 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
}

pre code {
  background: transparent;
  padding: 0;
  border: 0;
  color: inherit;
}

.prompt-box,
.code-snippet-box {
  background: #060a14;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 1.8em 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================================
   Comparison Tables & Data Grids
   ========================================================================== */

.comparison-table-wrapper,
.cheat-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 2.2em 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
}

.comparison-table,
.cheat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
  min-width: 640px;
}

.comparison-table th,
.cheat-table th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  padding: 14px 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--glass-border);
}

.comparison-table td,
.cheat-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border-soft);
  color: var(--text-secondary);
  vertical-align: top;
}

.comparison-table tr:hover td,
.cheat-table tr:hover td {
  background: rgba(56, 189, 248, 0.03);
}

/* ==========================================================================
   Temperature & Showdown Components
   ========================================================================== */

.temp-dial-container {
  background: linear-gradient(145deg, #0d1527 0%, #070a14 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
}

.temp-dial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.temp-card {
  background: #111a2e;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  transition: transform var(--transition), border-color var(--transition);
}

.temp-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
}

.temp-card.cold { border-top: 4px solid #06b6d4; }
.temp-card.focused { border-top: 4px solid #3b82f6; }
.temp-card.balanced { border-top: 4px solid #a855f7; }
.temp-card.creative { border-top: 4px solid #f97316; }
.temp-card.chaos { border-top: 4px solid #ef4444; }

.temp-val-badge {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.cold .temp-val-badge { background: rgba(6,182,212,0.15); color: #22d3ee; }
.focused .temp-val-badge { background: rgba(59,130,246,0.15); color: #60a5fa; }
.balanced .temp-val-badge { background: rgba(168,85,247,0.15); color: #c084fc; }
.creative .temp-val-badge { background: rgba(249,115,22,0.15); color: #fb923c; }
.chaos .temp-val-badge { background: rgba(239,68,68,0.15); color: #f87171; }

.showdown-box {
  background: #090e1a;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin: 24px 0;
  overflow: hidden;
}

.showdown-header {
  background: #111a2f;
  padding: 12px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.showdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.showdown-col {
  padding: 20px;
}

.showdown-col:first-child {
  border-right: 1px solid var(--glass-border);
  background: rgba(6,182,212,0.02);
}

.showdown-col:last-child {
  background: rgba(249,115,22,0.02);
}

.showdown-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
}

.tag-low { color: #38bdf8; }
.tag-high { color: #fb923c; }

/* ==========================================================================
   Stat Grids & Workflows
   ========================================================================== */

.stat-grid,
.stat-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 2.2em 0;
}

.stat-card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
}

.stat-number,
.stat-val {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.86rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 2.2em 0;
}

.workflow-card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.workflow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 104, 253, 0.2);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 104, 253, 0.4);
}

/* ==========================================================================
   FAQ Cards & Accordions
   ========================================================================== */

.faq-card,
.faq-item {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-bg-strong);
  padding: 20px 22px;
  transition: border-color var(--transition);
}

.faq-card:hover,
.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.faq-question,
.faq-item h3,
.faq-card h4 {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 10px;
}

.faq-answer,
.faq-item p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ==========================================================================
   Author Bio & Related Posts & CTA
   ========================================================================== */

.author-bio-card {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 48px;
}

.author-bio-card .author-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.author-info h3 {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.author-info p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.related-posts {
  margin-top: 54px;
}

.related-posts h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.related-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.related-card,
.post-card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform var(--transition), border-color var(--transition);
}

.related-card:hover,
.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
}

.article-cta-banner {
  background: linear-gradient(135deg, rgba(0, 104, 253, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(0, 104, 253, 0.4);
  border-radius: var(--radius-panel);
  padding: 40px 32px;
  margin-top: 56px;
  text-align: center;
}

.cta-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px 0;
  color: #ffffff;
}

.cta-content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

/* ==========================================================================
   Roadmap Flywheel & Project Deepdive Cards
   ========================================================================== */

.roadmap-flywheel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 2.4em 0;
}

.flywheel-step {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}

.flywheel-step:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
}

.flywheel-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.flywheel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.flywheel-desc {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.project-card-deepdive {
  background: #090e1c;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 2em 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.project-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border-soft);
}

.project-tier-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 104, 253, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(0, 104, 253, 0.4);
}

.project-complexity-tag {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tech-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tech-pill {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.prompt-code-snippet {
  background: #050811;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: #93c5fd;
  overflow-x: auto;
  margin-top: 14px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
  .article-body,
  .article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .article-aside,
  .table-of-contents-wrapper {
    position: static;
    order: 0;
    max-height: none;
    overflow-y: visible;
  }

  .toc,
  .table-of-contents-wrapper .glass-panel {
    margin-bottom: 16px;
  }

  .showdown-grid {
    grid-template-columns: 1fr;
  }

  .showdown-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
}

@media (max-width: 640px) {
  .article-shell,
  .blog-container {
    width: calc(100% - 24px);
    padding: 16px 0 60px;
  }

  .author-bio-card {
    flex-direction: column;
    text-align: center;
  }

  .stat-grid,
  .stat-highlight-grid,
  .workflow-steps {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Read Aloud (Text-to-Speech) Audio Player System
   ========================================================================== */

.read-aloud-panel {
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.read-aloud-panel.is-active {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 30px rgba(0, 104, 253, 0.15), 0 0 15px rgba(56, 189, 248, 0.1);
}

.read-aloud-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.read-aloud-meta-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.read-aloud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.read-aloud-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.read-aloud-panel.is-active .read-aloud-pulse-dot {
  background: #34d399;
  opacity: 1;
  box-shadow: 0 0 10px #34d399;
  animation: ra-pulse 1.8s infinite;
}

@keyframes ra-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.read-aloud-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.read-aloud-status {
  color: var(--text-secondary);
  font-weight: 500;
}

.read-aloud-controls-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.read-aloud-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), opacity var(--transition);
}

.read-aloud-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.read-aloud-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.read-aloud-btn.btn-play-primary {
  background: linear-gradient(135deg, #0068fd, #38bdf8);
  border-color: transparent;
  color: #ffffff;
  padding: 8px 18px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 104, 253, 0.3);
}

.read-aloud-btn.btn-play-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0256d0, #0ea5e9);
  box-shadow: 0 6px 20px rgba(0, 104, 253, 0.45);
}

.read-aloud-btn.btn-restart,
.read-aloud-btn.btn-stop {
  width: 36px;
  height: 36px;
  padding: 0;
}

.read-aloud-btn.btn-speed {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 6px 10px;
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

/* Progress Track */
.read-aloud-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  margin-top: 14px;
  overflow: hidden;
}

.read-aloud-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0068fd, #38bdf8);
  border-radius: 99px;
  transition: width 0.35s ease-out;
}

/* Visual Karaoke Reading Highlight */
.tts-reading-highlight {
  background: rgba(56, 189, 248, 0.07) !important;
  box-shadow: -6px 0 0 0 #38bdf8, 0 4px 20px rgba(56, 189, 248, 0.08) !important;
  border-radius: 4px;
  padding-left: 6px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Floating Mini-Player Pill */
.read-aloud-floating-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  padding: 10px 14px;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 99px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 104, 253, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  animation: ra-slide-up 0.3s ease-out;
}

@keyframes ra-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.floating-pill-content {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.floating-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.floating-pill-btn.floating-play-btn {
  background: linear-gradient(135deg, #0068fd, #38bdf8);
  border-color: transparent;
  color: #fff;
}

.floating-pill-btn:hover {
  transform: scale(1.06);
}

.floating-pill-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  max-width: 220px;
}

.floating-pill-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-pill-progress-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.floating-pill-progress {
  height: 100%;
  background: #38bdf8;
  border-radius: 99px;
  transition: width 0.35s ease-out;
}

.read-aloud-unsupported {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .read-aloud-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .read-aloud-controls-col {
    justify-content: flex-start;
  }

  .read-aloud-floating-pill {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ==========================================================================
   Subscription System (Modal, Sidebar Card, & Buttons)
   ========================================================================== */

/* Nav Subscribe Button */
.nav-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-subscribe-btn:hover {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
  transform: translateY(-1px);
}

/* Sidebar Subscribe Card */
.sidebar-subscribe-card {
  margin-top: 20px;
  padding: 22px 18px;
  background: linear-gradient(145deg, rgba(20, 24, 40, 0.8), rgba(12, 15, 28, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.sidebar-subscribe-card::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
  pointer-events: none;
}

.sidebar-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 8px;
}

.sidebar-subscribe-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--text-primary);
  line-height: 1.35;
}

.sidebar-subscribe-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.sidebar-subscribe-card .btn {
  width: 100%;
  justify-content: center;
}

/* Modal Overlay & Backdrop */
body.pn-modal-open {
  overflow: hidden;
}

.pn-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 7, 16, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pn-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialog Box */
.pn-modal-dialog {
  background: #0c101c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85),
              0 0 50px rgba(124, 58, 237, 0.18);
  max-width: 480px;
  width: 100%;
  padding: 34px 30px 28px;
  position: relative;
  transform: translateY(24px) scale(0.95);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.pn-modal-backdrop.is-active .pn-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Ambient glow accent inside modal */
.pn-modal-dialog::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 140px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.35), transparent 70%);
  filter: blur(35px);
  pointer-events: none;
}

/* Close Button */
.pn-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 2;
}

.pn-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transform: scale(1.06);
}

/* Modal Header & Icon */
.pn-modal-header {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
}

.pn-modal-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.3);
}

.pn-modal-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.25;
}

.pn-modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 auto;
  max-width: 380px;
}

/* Modal Form */
.pn-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pn-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pn-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pn-modal-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  box-sizing: border-box;
}

.pn-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.pn-modal-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.pn-modal-submit-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.pn-modal-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

.pn-modal-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.pn-modal-privacy {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Status / Alert Messages */
.pn-modal-status {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.pn-modal-status.error {
  display: flex;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Success View */
.pn-modal-success {
  display: none;
  text-align: center;
  padding: 10px 0 6px;
}

.pn-modal-success.is-visible {
  display: block;
  animation: pnFadeIn 0.3s ease forwards;
}

.pn-success-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.3);
}

.pn-modal-success h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.pn-modal-success p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 360px;
}

/* Spinner */
.pn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pnSpin 0.75s linear infinite;
  display: inline-block;
}

@keyframes pnSpin {
  to { transform: rotate(360deg); }
}

@keyframes pnFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .pn-modal-dialog {
    padding: 28px 20px 22px;
  }

  .pn-modal-title {
    font-size: 1.25rem;
  }
}
