/* Blog pages — same family as the film: lime + purple, Inter Tight / Instrument Serif / DM Sans */
:root {
  --lime: #d7ff1f; --purple: #4b00d1; --ink: #0c0b12; --paper: #fbfbf7; --muted: #5d5a6b; --line: #e6e4ec;
  --f-heavy: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif; --f-serif: 'Instrument Serif', Georgia, serif;
  --f-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.7 var(--f-body); }
a { color: inherit; }
.mono { font-family: var(--f-mono); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px max(16px, 4vw);
  background: rgba(215,255,31,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bar__me img { display: block; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px var(--lime), 0 0 0 4.5px var(--ink); }
.bar__blog { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
.bar__book { margin-left: auto; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--lime); text-decoration: none; font: 800 15px var(--f-heavy); white-space: nowrap; }

/* hero — the lime page from the film */
.hero { background: var(--lime); padding: clamp(40px, 8vw, 96px) max(16px, 4vw) clamp(36px, 5vw, 64px); }
.hero > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.hero__meta { margin-top: 0; margin-bottom: 18px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.hero__title { margin-top: 0; margin-bottom: 0; font: 900 clamp(38px, 6.4vw, 76px)/.98 var(--f-heavy); letter-spacing: -0.045em; text-wrap: balance; }
.hero__title em { font: italic 400 1.12em/.8 var(--f-serif); letter-spacing: -0.01em; }
.dot { display: inline-block; width: .17em; height: .17em; margin-left: .05em; border-radius: 50%; background: var(--purple); }
.hero__desc { margin-top: 22px; margin-bottom: 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 820px; }
.hero__by { display: flex; align-items: center; gap: 10px; margin-top: 26px; margin-bottom: 0; font-weight: 500; }
.hero__by img { border-radius: 50%; }

/* share */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.share__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-right: 4px; }
.share__btn { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent;
  color: var(--ink); font: 500 14px var(--f-body); text-decoration: none; cursor: pointer; }
.share__btn[hidden] { display: none; }
.share__native { background: var(--ink); color: var(--lime); }
@media (hover: hover) { .share__btn:hover { background: var(--ink); color: var(--lime); } }

/* the article */
.prose { max-width: 700px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) max(16px, 4vw) 24px; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }
.prose h2 { margin: 2em 0 .5em; font: 900 clamp(26px, 3.2vw, 34px)/1.1 var(--f-heavy); letter-spacing: -0.03em; }
.prose h3 { margin: 1.8em 0 .4em; font: 800 22px/1.25 var(--f-heavy); letter-spacing: -0.02em; }
.prose a { color: var(--purple); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 5px solid var(--lime); font: italic 400 clamp(24px, 2.8vw, 30px)/1.3 var(--f-serif); }
.prose blockquote p { margin: 0; }
.prose img { display: block; max-width: 100%; height: auto; margin: 1.8em auto; border-radius: 12px; box-shadow: 0 20px 50px -26px rgba(20,0,60,.45); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code { font: 15px var(--f-mono); background: #efedf4; padding: 2px 6px; border-radius: 5px; }
.prose pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: var(--ink); color: #f1f0f6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--purple); font-weight: 700; }

/* end of post */
.end { max-width: 700px; margin: 0 auto; padding: 8px max(16px, 4vw) 56px; }
.end > .share { padding-top: 28px; border-top: 1px solid var(--line); }
.author { display: flex; gap: 18px; align-items: flex-start; margin-top: 36px; padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 20px 44px -28px rgba(20,0,60,.4); }
.author img { flex: none; border-radius: 50%; box-shadow: 0 0 0 3px var(--lime); }
.author b { font: 800 20px var(--f-heavy); }
.author p { margin: 4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.author__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px !important; }
.author__links .mono { font-size: 13px; color: var(--ink); }
.pill { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--lime); color: var(--ink); text-decoration: none; font: 800 15px var(--f-heavy); }
.end__h { margin: 48px 0 14px; font: 900 24px var(--f-heavy); letter-spacing: -0.02em; }

/* post cards (end of post + index) */
.cards { display: grid; gap: 14px; }
.cards--index { max-width: 820px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) max(16px, 4vw) 64px; }
.card { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; border-radius: 16px; background: #fff; text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 20px 44px -28px rgba(20,0,60,.4); transition: translate .2s, box-shadow .2s; }
.card__n { font: 900 40px/.85 var(--f-heavy); letter-spacing: -0.05em; color: var(--purple); }
.card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card__meta { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card__title { font: 800 21px/1.2 var(--f-heavy); letter-spacing: -0.02em; }
.card__desc { color: var(--muted); font-size: 16px; line-height: 1.5; }
.card__go { font-size: 22px; color: var(--purple); }
@media (hover: hover) { .card:hover { translate: 0 -3px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 28px 54px -26px rgba(20,0,60,.5); } }
.empty { font: italic 400 26px var(--f-serif); }

.foot { padding: 28px max(16px, 4vw) calc(28px + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  body { font-size: 17.5px; }
  .bar__book { padding: 9px 14px; font-size: 14px; }
  .card { padding: 18px; gap: 14px; }
  .card__n { font-size: 32px; }
  .author { flex-direction: column; }
}
.author .author__ask { margin-top: 14px; color: var(--ink); font: 800 18px/1.25 var(--f-heavy); letter-spacing: -0.01em; }

/* the five-step diagram inside a post */
.prose figure.steps { margin: 1.6em 0 2em; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: st; }
.steps li { position: relative; counter-increment: st; margin: 0; padding: 44px 12px 14px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 30px -20px rgba(20,0,60,.45); display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(st); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lime); color: var(--ink); font: 800 13px var(--f-heavy); }
.steps li:not(:last-child)::after { content: '→'; position: absolute; right: -9px; top: 13px; z-index: 1; font-size: 14px; color: var(--purple); }
.steps b { font: 800 15px/1.2 var(--f-heavy); letter-spacing: -0.01em; }
.steps span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.steps figcaption { margin-top: 12px; text-align: center; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) {
  .steps ol { grid-template-columns: 1fr; gap: 8px; }
  .steps li { padding: 12px 14px 12px 50px; }
  .steps li::before { top: 50%; translate: 0 -50%; left: 14px; }
  .steps li:not(:last-child)::after { content: '↓'; right: auto; left: 22px; top: auto; bottom: -15px; }
}
.prose h3 { scroll-margin-top: 80px; }
.prose pre { font-size: 13.5px; line-height: 1.55; }
.prose pre { white-space: pre-wrap; overflow-wrap: anywhere; }
/* a book cover inside a post: small, centred, like a book on a table */
.prose figure.book { margin: 2.2em auto 2.4em; text-align: center; }
.prose figure.book img { width: min(260px, 62%); margin: 0 auto; border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 26px 50px -18px rgba(20,0,60,.5); }
.prose figure.book figcaption { margin: 16px auto 0; max-width: 36ch; font-size: 14px; line-height: 1.45; color: var(--muted); }
.end .author { margin-top: 8px; }
.end { border-top: 1px solid var(--line); padding-top: 36px; }
/* small method table inside a post */
.prose table.feeds { width: 100%; margin: 1.2em 0 1.6em; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 30px -22px rgba(20,0,60,.45); font-size: 16px; }
.feeds th { padding: 10px 16px; text-align: left; background: var(--ink); color: var(--lime); font: 500 11px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.feeds td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; line-height: 1.35; }
.feeds td b { display: block; font: 700 16px var(--f-body); }
.feeds td small { display: block; margin-top: 2px; font: 400 12px var(--f-mono); letter-spacing: .04em; color: var(--muted); }
.feeds td:last-child { color: var(--purple); font-weight: 600; white-space: nowrap; }
@media (max-width: 420px) { .feeds td, .feeds th { padding-left: 12px; padding-right: 12px; } .feeds td:last-child { white-space: normal; } }

/* between pages: crossfade, and the portrait glides (matches the film) */
@view-transition { navigation: auto; }
.bar__me { view-transition-name: me; border-radius: 50%; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: cubic-bezier(.4,0,.2,1); }
::view-transition-group(me) { animation-duration: .45s; animation-timing-function: cubic-bezier(.23,1,.32,1); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* 404 */
.lost { min-height: calc(100svh - 68px); display: flex; flex-direction: column; justify-content: center; }
.lost .hero { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.lost__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px !important; }
.lost__links a { padding: 12px 20px; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; font: 700 15px var(--f-body); }
.lost__links a.pill { border-color: var(--ink); background: var(--ink); color: var(--lime); }

/* --- pieces used by the earlier posts (same palette, type and cards as above) --- */
/* numbered lesson headings: the number in purple, like the post cards */
.prose h2.lesson { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.prose h2.lesson span { font: 900 1.25em/.85 var(--f-heavy); letter-spacing: -0.05em; color: var(--purple); min-width: 1.4em; }
.prose h2 small { font: 400 .55em var(--f-mono); letter-spacing: .04em; color: var(--muted); }

/* several books side by side */
.prose .books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 1.6em 0 2em; align-items: start; }
.prose .books figure.book { margin: 0; }
.prose .books figure.book img { width: min(150px, 100%); }
.prose .books figure.book figcaption { font-size: 13px; }
@media (max-width: 560px) { .prose .books { grid-template-columns: 1fr 1fr; } .prose .books figure.book:last-child { grid-column: 1 / -1; } .prose .books figure.book:last-child img { width: min(150px, 48%); } }

/* a pipeline diagram that reflows on a phone */
.prose figure.flow { margin: 1.8em 0 2.2em; display: flex; flex-direction: column; align-items: stretch; gap: 26px; }
.flow > *:not(figcaption):not(:last-child), .flow__group > *:not(:last-child) { position: relative; }
.flow > *:not(figcaption):not(:nth-last-child(2))::after, .flow__group > .flow__row::after {
  content: '↓'; position: absolute; left: 50%; bottom: -24px; translate: -50% 0; color: var(--purple); font-size: 15px; line-height: 1; }
.flow__node { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: #fff; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 30px -20px rgba(20,0,60,.45); }
.flow__node b { font: 800 15px/1.2 var(--f-heavy); letter-spacing: -0.01em; }
.flow__node span { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.flow__node--ai { background: #f1ebff; box-shadow: inset 0 0 0 1.5px var(--purple); }
.flow__node--ai b { color: var(--purple); }
.flow__node--local { background: #f6ffd0; box-shadow: inset 0 0 0 1.5px #a9cc00; }
.flow__group { display: flex; flex-direction: column; gap: 26px; padding: 14px; border: 1.5px dashed #cfcbd9; border-radius: 16px; }
.flow__label { margin: 0 !important; font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.flow__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flow__row > .flow__node { position: relative; }
.flow__row:not(.flow__row--out) > .flow__node:not(:last-child)::after { content: '→'; position: absolute; right: -10px; top: 50%; translate: 0 -50%; z-index: 1; color: var(--purple); font-size: 14px; }
.flow__row--out { grid-template-columns: 1fr 1fr; }
.flow figcaption { text-align: center; font: 500 12px/1.5 var(--f-mono); letter-spacing: .06em; color: var(--muted); }
@media (max-width: 640px) {
  .flow__row:not(.flow__row--out) { grid-template-columns: 1fr; gap: 22px; }
  .flow__row:not(.flow__row--out) > .flow__node:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -19px; translate: -50% 0; }
}

/* key / value table (the stack) */
.prose table.stack { width: 100%; margin: 1.2em 0 1.4em; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 30px -22px rgba(20,0,60,.45); font-size: 16px; }
.stack th, .stack td { padding: 12px 16px; text-align: left; vertical-align: top; line-height: 1.4; border-top: 1px solid var(--line); }
.stack tr:first-child th, .stack tr:first-child td { border-top: 0; }
.stack th { width: 34%; font: 500 11.5px/1.6 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
@media (max-width: 480px) { .stack th, .stack td { display: block; width: auto; } .stack td { border-top: 0; padding-top: 0; } }

/* a highlighted line */
.prose .callout { padding: 14px 18px; border-radius: 12px; background: var(--lime); font-weight: 500; }

/* Anatomy of an Insight: jump list, moves, before/after, drills */
.prose .moves { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.6em 0 0; }
.moves a { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--ink);
  color: var(--ink); text-decoration: none; font: 800 15px var(--f-heavy); }
@media (hover: hover) { .moves a:hover { background: var(--ink); color: var(--lime); } }
.prose h2.move { scroll-margin-top: 84px; margin-top: 2.4em; }
.prose h2.move small { display: block; margin-bottom: 8px; font: 500 12px var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--purple); }
.prose .premise { font: italic 400 clamp(22px, 2.5vw, 26px)/1.35 var(--f-serif); }
.prose .contrast { margin: 1.4em 0; }
.contrast__eyebrow, .contrast__label, .drill__label { margin: 0 0 10px !important; font: 500 11px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.contrast__eyebrow { color: var(--muted); }
.contrast__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contrast__col { padding: 16px 18px; border-radius: 12px; font-size: 15.5px; line-height: 1.6; }
.contrast__col p { margin: 0 0 .8em !important; } .contrast__col p:last-child { margin-bottom: 0 !important; }
.contrast__col ol { margin: 0 0 .8em; padding-left: 1.2em; } .contrast__col li { margin-bottom: .6em; }
.contrast__col--bad { background: #efedf4; color: #48455a; }
.contrast__col--bad .contrast__label { color: var(--muted); }
.contrast__col--good { background: #fff; box-shadow: inset 0 0 0 2px var(--purple), 0 14px 30px -22px rgba(20,0,60,.45); }
.contrast__col--good .contrast__label { color: var(--purple); }
.contrast__col--good em { font-style: normal; background: linear-gradient(transparent 58%, rgba(215,255,31,.9) 58%); }
@media (max-width: 640px) { .contrast__grid { grid-template-columns: 1fr; } }
.prose .changed { padding: 4px 0 4px 18px; border-left: 5px solid var(--lime); }
.prose .drill { margin: 1.4em 0 0; padding: 18px 20px; border-radius: 14px; background: var(--ink); color: #f1f0f6; }
.drill__label { color: var(--lime); }
.drill p { margin: 0 0 12px !important; }
.drill pre { margin: 0; padding: 14px 16px; border-radius: 10px; background: rgba(255,255,255,.07); color: #d9d7e3; }

.card__n { flex: none; min-width: 1.45em; }
