/* ═══ Insight post pages (insight-*.html) ════════════════════════════
   Linked after sub.css and ins.css. One page per LinkedIn post: a short
   hero with the author, our own write-up in a reading column, and a side
   column with the original post and related pages. Written by
   tools/insight_pages.py.
   ------------------------------------------------------------------ */

/* ── hero ── */
.pst-hero { padding: 9vh 0 6vh; }
.pst-hero h1 { max-width: 22ch; font-size: clamp(32px, 4.6vw, 60px); }
.pst-hero .lead { max-width: 62ch; }
.pst-by { margin: 30px 0 0; animation: heroIn .9s var(--ease) .32s both; }
.pst-by .av { width: 46px; height: 46px; }
.pst-by small time { white-space: nowrap; }

/* ── motion: topic icon, flow line, reading progress ──
   All of it stops under prefers-reduced-motion (bottom of this block). */
.pst-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) clamp(190px, 20vw, 280px); gap: 5vw; align-items: center; }
.pst-art { aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--line); color: var(--lime); display: grid; place-items: center;
           background: radial-gradient(90% 80% at 50% 30%, rgba(179,210,48,.12) 0%, rgba(239,243,233,.02) 62%), rgba(239,243,233,.02);
           animation: heroIn 1s var(--ease) .3s both; }
.pst-art svg { width: 64%; height: 64%; overflow: visible; }
.pst-art path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pstDraw 1.3s cubic-bezier(.45,0,.25,1) both; animation-delay: calc(.55s + var(--i) * .22s); }
.pst-dot { fill: var(--lime); stroke: none; offset-rotate: 0deg; opacity: 0;
           animation: pstRun 4.2s cubic-bezier(.45,0,.55,1) 2.2s infinite; }
@keyframes pstDraw { to { stroke-dashoffset: 0; } }
@keyframes pstRun { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 78% { opacity: 1; } 90%, 100% { offset-distance: 100%; opacity: 0; } }

.pst-flow { position: relative; height: 1px; margin-top: 7vh; background: var(--line); overflow: hidden; }
.pst-flow::after { content: ""; position: absolute; inset: 0; width: 100%;
                   background: linear-gradient(90deg, transparent calc(100% - 160px), rgba(179,210,48,.9) calc(100% - 8px), transparent);
                   transform: translateX(-100%); animation: pstFlow 5.5s cubic-bezier(.45,0,.55,1) 1s infinite; }
@keyframes pstFlow { 0% { transform: translateX(-100%); } 70%, 100% { transform: translateX(160px); } }

.pst-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 95; pointer-events: none; }
.pst-progress i { display: block; height: 100%; background: var(--lime); transform: scaleX(0); transform-origin: 0 50%; }

@media (max-width: 900px) {
  .pst-hero-in { grid-template-columns: minmax(0, 1fr) 96px; gap: 20px; align-items: start; }
  .pst-art { border-radius: 14px; }
}
@media (max-width: 620px) {
  .pst-hero-in { grid-template-columns: 1fr; }
  .pst-art { width: 84px; order: -1; margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .pst-art, .pst-art path { animation: none; stroke-dashoffset: 0; }
  .pst-dot, .pst-flow::after { display: none; }
}

/* ── body: reading column + side column ── */
.pst { padding: 8vh 0 12vh; }
.pst-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 6vw; align-items: start; }
.pst-body { max-width: 70ch; }
.pst-body h2 { font-size: clamp(22px, 2.1vw, 28px); font-weight: 600; line-height: 1.3; margin: 44px 0 14px; }
.pst-body h2:first-child { margin-top: 0; }
.pst-fig { margin: 0 0 40px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #10170F; }
.pst-fig img { display: block; width: 100%; height: auto; }
.pst-body p, .pst-body li { font-size: 16.5px; line-height: 1.8; color: rgba(239,243,233,.78); }
.pst-body p { margin: 0 0 18px; }
.pst-body ul { margin: 0 0 20px; padding-left: 0; list-style: none; }
.pst-body li { position: relative; padding: 0 0 10px 22px; }
.pst-body li::before { content: ""; position: absolute; left: 0; top: .78em; width: 9px; height: 1px; background: var(--lime); }
.pst-body strong { color: var(--text); font-weight: 600; }
.pst-body a { color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(179,210,48,.55); transition: color .25s, border-color .25s; }
.pst-body a:hover { color: var(--lime); border-color: var(--lime); }
.pst-body dl { margin: 0 0 20px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; }
.pst-body dt { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); padding-top: 4px; }
.pst-body dd { margin: 0; font-size: 15.5px; line-height: 1.7; color: rgba(239,243,233,.78); }

.pst-side { position: sticky; top: 104px; display: grid; gap: 18px; }
.pst-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 22px 22px 24px; }
.pst-k { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 14px; }
.pst-card blockquote { margin: 0; font-size: 14.5px; line-height: 1.7; color: rgba(239,243,233,.8); }
.pst-card .li-head { margin-bottom: 12px; }
.pst-card .li-head .av { width: 38px; height: 38px; font-size: 12px; }
.pst-card .li-tags { margin-top: 14px; }
.pst-link { display: inline-block; margin-top: 16px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
            color: var(--lime); text-decoration: none; border-bottom: 1px solid rgba(179,210,48,.4); padding-bottom: 3px; }
.pst-link:hover { border-color: var(--lime); }
.pst-rel { list-style: none; margin: 0; padding: 0; }
.pst-rel li { border-top: 1px solid var(--line); }
.pst-rel li:first-child { border-top: 0; }
.pst-rel a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 14.5px; color: var(--text); text-decoration: none; transition: color .25s; }
.pst-rel a::after { content: "\2192"; color: var(--lime); opacity: .5; transition: opacity .25s, transform .25s; }
.pst-rel a:hover { color: var(--lime); }
.pst-rel a:hover::after { opacity: 1; transform: translateX(3px); }

.pst-more .ins-list { border-top: 1px solid var(--line); }
.pst-all { margin: 30px 0 0; }

@media (max-width: 1000px) {
  .pst-in { grid-template-columns: 1fr; gap: 40px; }
  .pst-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .pst-side { grid-template-columns: 1fr; }
  .pst-body p, .pst-body li { font-size: 15.5px; }
  .pst-body dl { grid-template-columns: 1fr; gap: 2px; }
  .pst-body dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .pst-by { animation: none; } }

/* ── light mode ── */
html[data-theme="light"] .pst-body p,
html[data-theme="light"] .pst-body li,
html[data-theme="light"] .pst-body dd,
html[data-theme="light"] .pst-card blockquote { color: #4A4F49; }
html[data-theme="light"] .pst-body h2,
html[data-theme="light"] .pst-body strong { color: #12180F; }
html[data-theme="light"] .pst-body li::before { background: #467D00; }
html[data-theme="light"] .pst-body dt { color: #467D00; }
html[data-theme="light"] .pst-body a { color: #12180F; border-bottom: 2px solid #B3D230; }
html[data-theme="light"] .pst-body a:hover { color: #0D1600; background: rgba(179,210,48,.20); }
html[data-theme="light"] .pst-card { background: #FFFFFF; border-color: #E5E7E4; box-shadow: 0 4px 18px rgba(18,24,15,.04); }
html[data-theme="light"] .pst-k { color: #5C615B; }
html[data-theme="light"] .pst-link { color: #12180F; border-bottom: 2px solid #B3D230; }
html[data-theme="light"] .pst-link:hover { background: rgba(179,210,48,.20); }
html[data-theme="light"] .pst-rel li,
html[data-theme="light"] .pst-more .ins-list { border-color: #E5E7E4; }
html[data-theme="light"] .pst-rel a { color: #12180F; }
html[data-theme="light"] .pst-rel a::after { color: #467D00; }
html[data-theme="light"] .pst-rel a:hover { color: #467D00; }
html[data-theme="light"] .pst-by strong { color: #12180F; }
html[data-theme="light"] .pst-by small { color: #5C615B; }
html[data-theme="light"] .pst-art { color: #467D00; border-color: #E5E7E4; box-shadow: 0 4px 18px rgba(18,24,15,.04);
                                    background: radial-gradient(90% 80% at 50% 30%, rgba(179,210,48,.18) 0%, #F6F7F5 66%); }
html[data-theme="light"] .pst-dot { fill: #B3D230; }
html[data-theme="light"] .pst-flow { background: #E5E7E4; }
html[data-theme="light"] .pst-flow::after { background: linear-gradient(90deg, transparent calc(100% - 160px), #B3D230 calc(100% - 8px), transparent); }
html[data-theme="light"] .pst-progress i { background: #B3D230; }
html[data-theme="light"] .pst-fig { border-color: #E5E7E4; background: #F3F5F1; }
