/* =================================================================
   People Journal — dynamic blog + article page styles.
   Additive layer on top of styles.css (design tokens reused).
   Does NOT modify any existing rule.
   ================================================================= */

/* make dynamic cards behave as links without changing their look */
a.pj-card { color: inherit; text-decoration: none; }

/* ---- preview banner (admin only) ---- */
.preview-bar { background: #b45309; color: #fff; text-align: center; padding: 10px 16px; font-family: var(--font-head); font-weight: 600; font-size: .9rem; position: sticky; top: 0; z-index: 60; }

/* ---- article hero ---- */
.article-hero { padding-bottom: clamp(96px, 11vw, 132px); }
.article-hero h1 { color: #fff; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; color: var(--on-dark); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.article-meta__author { display: flex; align-items: center; gap: 12px; }
.article-meta__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.3); flex: none; }
.article-meta__avatar--i { display: grid; place-items: center; background: var(--grad-accent); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.article-meta__author b { color: #fff; display: block; line-height: 1.2; }
.article-meta__author em { color: var(--on-dark-muted); font-style: normal; font-weight: 500; font-size: .82rem; display: block; }
.article-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.35); }

/* ---- cover image (overlaps hero) ---- */
.article-cover { margin: -72px auto 0; max-width: 1000px; position: relative; z-index: 3; }
.article-cover img { width: 100%; border-radius: var(--r-xl); box-shadow: var(--sh-4); display: block; }
.article-cover figcaption { text-align: center; color: var(--muted); font-size: .86rem; margin-top: 12px; }

/* ---- body layout ---- */
.article-grid { gap: clamp(32px, 4vw, 64px); align-items: start; }
.article-aside { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 22px; }

.article-toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--sh-1); }
.article-toc h4 { font-family: var(--font-head); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.article-toc ul { display: flex; flex-direction: column; gap: 2px; }
.article-toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); color: var(--body); font-size: .92rem; transition: color .2s, border-color .2s; }
.article-toc a:hover, .article-toc a.active { color: var(--blue-600); border-color: var(--blue); }
.article-toc .toc-l3 a { padding-left: 26px; font-size: .88rem; }

/* ---- share ---- */
.article-share > span { display: block; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.share-btns { display: flex; gap: 10px; }
.share-btns a, .share-copy { width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--navy); cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.share-btns a svg, .share-copy svg { width: 18px; height: 18px; }
.share-btns a:hover, .share-copy:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }
.share-copy.copied { background: #18A05A; color: #fff; border-color: #18A05A; }
.article-share--inline { display: none; }

/* ---- prose ---- */
.article-prose { color: var(--body); font-size: 1.08rem; line-height: 1.8; }
.article-prose > *:first-child { margin-top: 0; }
.article-prose h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--ink); line-height: 1.2; margin: 1.9em 0 .55em; scroll-margin-top: 100px; }
.article-prose h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); margin: 1.6em 0 .5em; scroll-margin-top: 100px; }
.article-prose h4 { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 1.4em 0 .4em; }
.article-prose p { margin: 0 0 1.15em; }
.article-prose a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }
.article-prose a:hover { color: var(--navy); }
.article-prose ul, .article-prose ol { margin: 0 0 1.2em 1.35em; }
.article-prose li { margin: .4em 0; }
.article-prose blockquote { border-left: 3px solid var(--blue); padding: 6px 0 6px 22px; margin: 1.7em 0; font-family: var(--font-display); font-style: italic; font-size: 1.22rem; line-height: 1.5; color: var(--navy); }
.article-prose pre { background: var(--navy); color: #e6eefc; padding: 20px 22px; border-radius: 14px; overflow-x: auto; margin: 1.7em 0; font-size: .9rem; line-height: 1.6; }
.article-prose pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.article-prose :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); padding: 2px 7px; border-radius: 6px; font-size: .88em; color: var(--navy); }
.article-prose img { max-width: 100%; height: auto; border-radius: 14px; margin: 1.5em 0; box-shadow: var(--sh-1); }
.article-prose figure { margin: 1.7em 0; }
.article-prose figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; text-align: center; }
.article-prose table { width: 100%; border-collapse: collapse; margin: 1.7em 0; font-size: .95rem; display: block; overflow-x: auto; }
.article-prose th, .article-prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.article-prose th { background: var(--surface); font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.article-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.article-prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; margin: 1.7em 0; }
.article-prose .callout { background: rgba(46,124,246,.06); border: 1px solid rgba(46,124,246,.2); border-left: 4px solid var(--blue); border-radius: 12px; padding: 16px 20px; margin: 1.7em 0; color: var(--ink); }
.article-prose .callout--success { background: rgba(24,160,90,.07); border-color: rgba(24,160,90,.3); border-left-color: #18A05A; }
.article-prose .callout--warn { background: rgba(202,138,4,.08); border-color: rgba(202,138,4,.3); border-left-color: #CA8A04; }

/* ---- prev / next ---- */
.article-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.article-pn__link { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.article-pn__link:hover { border-color: rgba(46,124,246,.4); box-shadow: var(--sh-2); transform: translateY(-3px); }
.article-pn__link span { font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--blue-600); }
.article-pn__link b { display: block; color: var(--ink); font-family: var(--font-head); margin-top: 6px; }
.article-pn__next { text-align: right; }

@media (max-width: 920px) {
  .article-aside .article-share { display: none; }
  .article-share--inline { display: flex; align-items: center; gap: 18px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
  .article-share--inline > span { margin: 0; }
}
@media (max-width: 680px) {
  .article-pn { grid-template-columns: 1fr; }
  .article-pn__next { text-align: left; }
  .article-cover { margin-top: -48px; }
}
