/* ============================================================
   Blog article styles — shared by all /blog/<post>/ pages.
   Loaded after /styles.css, reuses its theme variables.
   ============================================================ */

/* ---------- Page frame ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 18px 0;
}

.page h1 {
  font-size: clamp(30px, 5.5vw, 42px);
  line-height: 1.18;
  margin: 0 0 16px;
  text-align: center;
  background: linear-gradient(120deg, #c3aefb, #8be4f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.page .lead {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 26px;
  text-align: center;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.post-meta {
  text-align: center;
  font-size: 13.5px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .85;
  margin: -10px 0 12px;
}

/* divider under the meta line (kept dim in dark mode) */
.post-meta::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  opacity: .4;
}
html[data-theme="light"] .post-meta::after { opacity: .8; }

/* ---------- Body copy ---------- */
.article-body {
  text-align: left;
}

.article-body p {
  font-size: 17px;
  line-height: 1.8;
  margin: 0 0 20px;
}

/* opening paragraph reads bigger, like a magazine intro */
.article-body > p:first-child {
  font-size: 19px;
  line-height: 1.75;
}

.article-body a {
  color: #c4b5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 181, 253, .5);
  transition: color .15s ease, border-color .15s ease;
}
.article-body a:hover {
  color: #22d3ee;
  border-bottom-color: rgba(34, 211, 238, .6);
}
html[data-theme="light"] .article-body a { color: #7c3aed; border-bottom-color: rgba(124, 58, 237, .35); }
html[data-theme="light"] .article-body a:hover { color: #0e7490; border-bottom-color: rgba(14, 116, 144, .5); }

/* ---------- Headings ----------
   Dark mode: solid soft lavender (gradients glare on dark backgrounds).
   Light mode: brand gradient, matching the homepage title. */
.article-body h2 {
  position: relative;
  font-size: clamp(23px, 3.6vw, 28px);
  line-height: 1.3;
  margin: 52px 0 16px;
  padding-left: 16px;
  color: #cfc6ea;
}
.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  bottom: .12em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(139, 92, 246, .5), rgba(34, 211, 238, .4));
}
html[data-theme="light"] .article-body h2 {
  background: linear-gradient(120deg, var(--accent), #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .article-body h2::before {
  background: linear-gradient(180deg, var(--accent), #22d3ee);
}

.article-body h3 {
  font-size: 19.5px;
  line-height: 1.35;
  margin: 32px 0 12px;
  color: var(--fg);
}
.article-body h3::before {
  content: "// ";
  color: rgba(34, 211, 238, .45);
  font-weight: 800;
}
html[data-theme="light"] .article-body h3::before { color: #0891b2; opacity: .8; }

/* ---------- Phrase / example cards ---------- */
.phrase-card {
  position: relative;
  background: linear-gradient(135deg, rgba(139, 92, 246, .07), rgba(34, 211, 238, .05));
  border: 1px solid rgba(255, 255, 255, .1);
  border-left: none;
  border-radius: 14px;
  padding: 18px 22px 18px 26px;
  margin: 18px 0;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.phrase-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(139, 92, 246, .55), rgba(34, 211, 238, .45));
}
html[data-theme="light"] .phrase-card::before {
  background: linear-gradient(180deg, var(--accent), #22d3ee);
}
.phrase-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, .35);
  box-shadow: 0 6px 24px rgba(139, 92, 246, .10);
}
html[data-theme="light"] .phrase-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(34, 211, 238, .05)), rgba(255, 255, 255, .75);
  border-color: rgba(0, 0, 0, .08);
}

.phrase-card .phrase {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 8px;
}

/* tone / template label rendered as a small pill */
.phrase-card .tone {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #c9bcff;
  background: rgba(139, 92, 246, .18);
  border: 1px solid rgba(139, 92, 246, .35);
  border-radius: 999px;
  padding: 3px 11px;
  margin: 0 0 10px;
}
html[data-theme="light"] .phrase-card .tone {
  color: #6d28d9;
  background: rgba(124, 58, 237, .10);
  border-color: rgba(124, 58, 237, .3);
}

.phrase-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
}
.phrase-card p em {
  color: var(--muted);
}

/* before/after variants (used by comparison posts):
   "before" is the dull draft — neutral and dimmed;
   "after" carries the brand accent, i.e. the better way. */
.phrase-card:has(.tone-before) {
  background: rgba(255, 255, 255, .03);
}
.phrase-card:has(.tone-before)::before {
  background: rgba(191, 195, 214, .3);
}
.phrase-card:has(.tone-before):hover {
  border-color: rgba(255, 255, 255, .2);
  box-shadow: none;
}
.phrase-card .tone-before {
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}
.phrase-card:has(.tone-before) p {
  color: var(--muted);
}
.phrase-card:has(.tone-after) {
  border-color: rgba(139, 92, 246, .3);
  box-shadow: 0 0 20px rgba(139, 92, 246, .08);
}
html[data-theme="light"] .phrase-card:has(.tone-before) { background: rgba(0, 0, 0, .025); }
html[data-theme="light"] .phrase-card:has(.tone-before)::before { background: rgba(44, 50, 69, .22); }
html[data-theme="light"] .phrase-card .tone-before { color: #5a6175; background: rgba(0, 0, 0, .04); border-color: rgba(0, 0, 0, .14); }
html[data-theme="light"] .phrase-card:has(.tone-after) { border-color: rgba(124, 58, 237, .3); box-shadow: 0 0 20px rgba(124, 58, 237, .08); }

/* ---------- Lists ---------- */
.tip-list {
  list-style: none;
  padding-left: 6px;
  margin: 14px 0 28px;
}
.tip-list li {
  position: relative;
  font-size: 16.5px;
  line-height: 1.75;
  margin-bottom: 12px;
  padding-left: 26px;
}
.tip-list li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  top: 0;
  font-size: 17px;
  color: rgba(157, 140, 255, .65);
}
html[data-theme="light"] .tip-list li::before { color: #7c3aed; }
.tip-list li strong {
  color: var(--fg);
}

/* ---------- CTA (unchanged design, shared here) ---------- */
.cta-betterway { text-align: center; margin: 10px auto 40px; max-width: 600px; padding: 10px; }
.cta-subtitle { font-size: 16px; color: var(--muted); margin-bottom: 12px; }
.cta-btn { display: inline-block; margin-top: 6px; padding: 14px 28px; font-size: 18px; font-weight: 700; text-decoration: none; color: #fff; background: linear-gradient(90deg, #8a4bff, #00c6ff); border-radius: 30px; box-shadow: 0 0 0 0 rgba(138, 75, 255, 0.55); animation: cta-pulse 1.8s ease-in-out infinite; transition: transform 0.2s ease, box-shadow 0.2s ease; }
@keyframes cta-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(138, 75, 255, 0.55), 0 0 18px rgba(0, 198, 255, 0.25); } 50% { box-shadow: 0 0 0 10px rgba(138, 75, 255, 0), 0 0 32px rgba(0, 198, 255, 0.5); } }
.cta-btn:hover { animation: none; transform: translateY(-2px); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); }
html[data-theme="light"] .cta-btn { color: #fff; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .article-body p { font-size: 16px; }
  .article-body > p:first-child { font-size: 17.5px; }
  .phrase-card { padding: 15px 16px 15px 20px; }
  .phrase-card .phrase { font-size: 18px; }
  .tip-list li { font-size: 15.5px; }
}
