/* GentleCase — article reading page (shared by every blog/<slug>.html) */

/* ---------- Masthead = live banner (light lavender field, no image) ---------- */
.post-hero {
  position: relative;
  overflow: hidden;
  --hero-accent: var(--accent-deep);   /* purple — readable on lavender */
  --hero-text: var(--ink);
  --hero-muted: var(--muted);
  background: #ECEAFB;                  /* requested lavender */
  border-bottom: 1px solid var(--line-2);
}
.post-hero::before {               /* soft purple washes for depth */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 95% at 84% 22%, rgba(196, 181, 253, 0.42), transparent 60%),
    radial-gradient(52% 80% at 4% 0%, rgba(167, 139, 250, 0.22), transparent 58%);
}
.post-hero::after {                /* faint dot grid, faded toward the edges */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(76, 29, 149, 0.06) 1px, transparent 0);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 88% at 50% 36%, #000 28%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 88% at 50% 36%, #000 28%, transparent 80%);
}
.post-hero .post-hero-inner {
  position: relative; z-index: 1;
  max-width: 1140px; margin: 0 auto;
  padding: 60px 28px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px;
  align-items: center;
  text-align: left;
}
.post-hero-text { min-width: 0; }

.post-crumbs {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.post-crumbs a { color: var(--muted); transition: color 150ms ease; }
.post-crumbs a:hover { color: var(--hero-text); }
.post-crumbs .sep { color: var(--muted-2); }
.post-crumbs .here { color: var(--ink-3); font-weight: 500; }

.post-kicker {
  display: inline-block; margin: 20px 0 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--hero-accent);
}

.post-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--hero-text); margin: 14px 0 0; max-width: 20ch; text-wrap: balance;
}
.post-hero h1 em { color: var(--hero-accent); font-style: italic; }
.post-hero .post-dek {
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55;
  color: var(--ink-3); max-width: 54ch; margin: 20px 0 0; text-wrap: pretty;
}

/* byline + share */
.post-byline { display: inline-flex; align-items: center; gap: 18px; margin-top: 30px; }
.post-byline .who { display: flex; align-items: center; gap: 12px; text-align: left; }
.post-byline .who .name { font-size: 14px; font-weight: 700; color: var(--hero-text); }
.post-byline .who .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.post-byline .vrule { width: 1px; align-self: stretch; background: var(--line); }
.post-share { display: flex; gap: 8px; }
.post-share a,
.post-share button {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-3);
  cursor: pointer; position: relative;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.post-share a:hover,
.post-share button:hover { background: #fff; color: var(--accent-deep); border-color: var(--accent); transform: translateY(-1px); }
.post-share a svg,
.post-share button svg { width: 16px; height: 16px; }
.post-share .copied-toast {
  position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
  background: #000; color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
}

/* hero art — glass card with a topic icon, gold badge + swap arrows */
.hero-art { display: flex; justify-content: center; }
.hero-art-card {
  position: relative; width: 300px; height: 268px; border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 30px 55px -28px rgba(76, 29, 149, 0.28);
  display: grid; place-items: center; overflow: hidden;
}
.hero-art-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(46% 44% at 50% 44%, rgba(167, 139, 250, 0.16), transparent 70%);
}
.hero-art-figure { position: relative; line-height: 0; color: var(--accent-deep); }
.hero-art-figure > svg { stroke-width: 1.4; }
.hero-art-badge {
  position: absolute; right: -10px; bottom: -8px;
  width: 46px; height: 46px; border-radius: 50%;
  background: #c9a96e; color: #1d2026;
  display: grid; place-items: center;
  box-shadow: 0 10px 20px -8px rgba(76, 29, 149, 0.45);
}
.hero-art-badge svg { stroke-width: 3; }
.hero-art-swap { position: absolute; top: 18px; right: 18px; color: var(--muted-2); }

@media (max-width: 900px) {
  .post-hero .post-hero-inner { grid-template-columns: 1fr; gap: 30px; padding: 48px 24px 52px; }
  .hero-art { justify-content: flex-start; }
  .hero-art-card { width: 248px; height: 224px; }
}
@media (max-width: 560px) {
  .hero-art { display: none; }
}

/* ---------- Two-column shell ---------- */
.post-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 64px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 28px 96px;
  align-items: start;
}
.post-main { min-width: 0; max-width: 720px; }

/* ---------- Body typography ---------- */
.post-body { counter-reset: h2sec; }
.post-body p { font-size: 17.5px; line-height: 1.75; color: var(--ink-3); margin: 0 0 24px; text-wrap: pretty; }
.post-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 3.6em;
  line-height: 0.78;
  float: left;
  color: var(--accent);
  margin: 8px 12px 0 0;
}
.post-body h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 52px 0 18px;
  line-height: 1.18;
  scroll-margin-top: 92px;
  text-wrap: balance;
}
.post-body h2::before {
  counter-increment: h2sec;
  content: counter(h2sec);
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
}
.post-body h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 34px 0 12px; letter-spacing: -0.01em; }
.post-body ul { padding-left: 0; margin: 0 0 24px; list-style: none; }
.post-body ul li { font-size: 17px; line-height: 1.7; color: var(--ink-3); padding: 6px 0 6px 26px; position: relative; }
.post-body ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.post-body ol { padding-left: 24px; margin: 0 0 24px; }
.post-body ol li { font-size: 17px; line-height: 1.7; color: var(--ink-3); margin-bottom: 10px; }
.post-body a { color: var(--accent-deep); font-weight: 600; }
.post-body a:hover { text-decoration: underline; }
.post-body strong { color: var(--ink); font-weight: 700; }

/* ---------- Key takeaways ---------- */
.post-takeaways {
  background:
    radial-gradient(120% 160% at 0% 0%, oklch(0.96 0.03 200 / 0.4), transparent 55%),
    var(--purple-50);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 26px 30px;
  margin: 0 0 40px;
}
.post-takeaways .tk-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 16px;
}
.post-takeaways .tk-label svg { width: 16px; height: 16px; }
.post-takeaways ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-takeaways ul li { position: relative; padding: 0 0 0 26px; font-size: 15.5px; line-height: 1.55; color: var(--ink-3); }
.post-takeaways ul li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.post-takeaways ul li strong { color: var(--ink); font-weight: 700; }

/* ---------- Check / spec list ---------- */
.post-checklist { display: grid; gap: 12px; margin: 28px 0 32px; }
.post-checklist .ck {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 18px;
}
.post-checklist .ck-mark {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid; place-items: center;
  margin-top: 1px;
}
.post-checklist .ck-mark svg { width: 15px; height: 15px; }
.post-checklist .ck-text { font-size: 15.5px; line-height: 1.55; color: var(--ink-3); }
.post-checklist .ck-text strong { color: var(--ink); font-weight: 700; }

/* ---------- Pull quote ---------- */
.post-pull {
  background:
    radial-gradient(120% 160% at 0% 0%, oklch(0.96 0.03 200 / 0.35), transparent 60%),
    var(--purple-50);
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  padding: 24px 28px;
  margin: 36px 0;
}
.post-pull p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  font-style: italic;
  line-height: 1.4;
  color: var(--accent-deep);
  margin: 0;
}

/* ---------- Article-specific blocks (carried over from posts) ---------- */
.deadline-card { background: #fdf3f3; border: 1px solid #f0d0d0; border-radius: 16px; padding: 26px 30px; margin: 32px 0; }
.deadline-card .dc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); margin-bottom: 8px; }
.deadline-card .dc-rule { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 0 0 14px; }
.deadline-card .dc-note { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin: 0; }

.phase-row { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.phase-num { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.phase-body { flex: 1; }
.phase-body strong { display: block; font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.phase-body span { font-size: 15px; color: var(--ink-3); line-height: 1.6; }

.timeline-block { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 30px; margin: 32px 0; }
.timeline-block h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 18px; text-transform: uppercase; letter-spacing: 0.08em; }
.timeline-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.timeline-row:last-child { border-bottom: none; padding-bottom: 0; }
.timeline-date { font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace); font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.timeline-desc { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.timeline-desc strong { color: var(--ink); font-weight: 700; }

.checklist { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 30px; margin: 32px 0; }
.checklist h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 18px; }
.checklist-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.checklist-item:last-child { margin-bottom: 0; }
.checklist-box { width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 5px; flex-shrink: 0; margin-top: 1px; }
.checklist-item span { font-size: 15px; color: var(--ink-3); line-height: 1.55; }
.risk-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 5px; padding: 3px 8px; margin-left: 8px; vertical-align: middle; }
.risk-high { background: #fde8e8; color: var(--rose); }
.risk-med { background: var(--accent-soft); color: var(--accent-deep); }

.step-row { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; font-family: var(--font-mono, ui-monospace, monospace); }
.step-body { flex: 1; }
.step-body strong { display: block; font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.step-body span { font-size: 15px; color: var(--ink-3); line-height: 1.6; }
.audit-card { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 24px 28px; margin: 24px 0 36px; }
.audit-card h3 { margin-top: 0; }

.post-divider { border: none; border-top: 1px solid var(--line-2); margin: 48px 0; }

/* ---------- End-of-article CTA ---------- */
.post-cta { background: var(--ink); border-radius: 20px; padding: 38px; margin-top: 56px; }
.post-cta h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: #fff; letter-spacing: -0.01em; margin: 0 0 12px; }
.post-cta h3 em { color: var(--accent); font-style: italic; }
.post-cta p { font-size: 15px; color: rgba(255, 255, 255, 0.7); margin: 0 0 24px; line-height: 1.55; }
.post-cta .btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.post-cta .btn-primary { background: var(--accent); color: #fff; }
.post-cta .btn-ghost { border-color: rgba(255, 255, 255, 0.25); color: #fff; }

/* ---------- Sidebar ---------- */
.post-aside { position: sticky; top: 92px; align-self: start; display: grid; gap: 26px; }
@media (max-width: 980px) { .post-aside { position: static; } }

.aside-progress { display: flex; align-items: center; gap: 14px; }
.aside-progress .ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.aside-progress .ring svg { transform: rotate(-90deg); display: block; }
.aside-progress .ring .pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--accent-deep); font-variant-numeric: tabular-nums;
}
.aside-progress .pg-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.aside-progress .pg-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.aside-toc .toc-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; padding-top: 22px; border-top: 1px solid var(--line-2);
}
.aside-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aside-toc a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.4; color: var(--muted);
  transition: background 150ms ease, color 150ms ease;
}
.aside-toc a .num { font-size: 11px; font-weight: 700; color: var(--muted-2); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.aside-toc a:hover { color: var(--ink-2); background: var(--bg-3); }
.aside-toc a.active { color: var(--accent-deep); background: var(--accent-soft); font-weight: 600; }
.aside-toc a.active .num { color: var(--accent); }

.aside-cta { background: var(--ink); border-radius: 16px; padding: 22px; }
.aside-cta h4 { font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1.2; color: #fff; margin: 0 0 16px; }
.aside-cta .btn { width: 100%; background: #fff; color: var(--ink); }
.aside-cta .btn:hover { background: var(--accent-soft); color: var(--accent-deep); }

.aside-top {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 0; transition: color 150ms ease;
}
.aside-top:hover { color: var(--ink); }
.aside-top svg { width: 15px; height: 15px; }

/* ---------- Keep reading ---------- */
.post-related { border-top: 1px solid var(--line-2); }
.post-related .pr-inner { max-width: 1120px; margin: 0 auto; padding: 64px 28px 0; }
.post-related .pr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.post-related h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.015em; color: var(--ink); margin: 0; }
.post-related .pr-all { font-size: 14px; font-weight: 600; color: var(--accent-deep); flex: 0 0 auto; }
.post-related .pr-all:hover { color: var(--accent); }
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pr-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,17,21,0.03), 0 12px 28px -20px rgba(15,17,21,0.10);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.pr-card:hover { box-shadow: 0 18px 38px -20px rgba(15,17,21,0.16); transform: translateY(-3px); }
.pr-thumb { position: relative; height: 150px; background: var(--bg-3); display: grid; place-items: center; border-bottom: 1px solid var(--line-2); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-thumb .pr-mark { color: var(--accent); opacity: 0.16; }
.pr-thumb .pr-pill {
  position: absolute; top: 14px; left: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-deep); background: rgba(255,255,255,0.92);
  padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 8px -3px rgba(15,17,21,0.18);
}
.pr-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.pr-body h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); margin: 0; text-wrap: pretty; }
.pr-body h3 em { font-style: italic; color: var(--accent-deep); }
.pr-meta { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.pr-meta .date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.pr-meta .read { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .post-shell { grid-template-columns: 1fr; gap: 0; max-width: 760px; }
  .post-aside {
    margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line-2);
    grid-auto-flow: row;
  }
  .post-main { max-width: none; }
}
@media (max-width: 760px) {
  .post-hero .post-hero-inner { padding: 40px 22px 48px; }
  .post-byline { flex-direction: column; gap: 16px; }
  .post-byline .vrule { display: none; }
  .pr-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .post-body h2 { font-size: 24px; }
}
