/* =========================================================
   Writing (Substack) — page, subscribe forms, read-along band
   ========================================================= */
.jb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.jb-sub { display: flex; width: 100%; max-width: 520px; border-bottom: 1px solid rgba(74,30,55,0.45); transition: border-color 400ms ease; }
.jb-sub:focus-within { border-color: #4A1E37; }
.jb-sub-field { flex: 1; }
.jb-sub input { width: 100%; border: 0; background: transparent; padding: 16px 0; font: 400 16px/1.4 var(--jb-sans); color: #2A2723; outline: none; }
.jb-sub input::placeholder { color: rgba(42,39,35,0.45); }
.jb-sub button { border: 0; background: none; cursor: pointer; padding: 0 0 0 18px; font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #4A1E37; transition: color 300ms ease, transform 300ms ease; }
.jb-sub button:hover { color: #8C6B3E; transform: translateX(3px); }

/* Writing page */
.w-page { background: #FAF6EF; color: #2A2723; }
.w-hero { padding: calc(var(--headerH) + clamp(60px, 9vw, 140px)) var(--gut) clamp(60px, 8vw, 110px); max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.w-title { margin: 0; font-family: var(--jb-serif); font-weight: 300; font-size: clamp(46px, 7vw, 112px); line-height: 0.98; letter-spacing: -0.025em; max-width: 13ch; }
.w-title em, .w-ftitle em { font-style: italic; color: #4A1E37; }
.w-lead { margin: 0; max-width: 52ch; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.7; color: rgba(42,39,35,0.78); }
.w-in { opacity: 0; transform: translateY(18px); transition: opacity 1000ms var(--jb-ease), transform 1000ms var(--jb-ease); }
.w-in:nth-child(2) { transition-delay: 150ms; } .w-in:nth-child(3) { transition-delay: 300ms; } .w-in:nth-child(4) { transition-delay: 450ms; }
.is-ready .w-in { opacity: 1; transform: none; }
.w-label { margin: 0 0 22px; font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #8C6B3E; }
.w-latest, .w-more { max-width: 1100px; margin: 0 auto; padding: 0 var(--gut) clamp(70px, 9vw, 130px); }
.w-feature { position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(40px, 6vw, 88px) clamp(28px, 5vw, 80px); background: #F2E9DA; color: #2A2723; text-decoration: none; overflow: hidden; isolation: isolate; }
.w-feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #4A1E37; transform: translateY(101%); transition: transform 900ms var(--jb-ease); }
.w-feature:hover::before, .w-feature:focus-visible::before { transform: none; }
.w-feature:hover, .w-feature:focus-visible { color: #F7F1E6; }
.w-date { font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #8C6B3E; transition: color 600ms ease; }
.w-ftitle { font-family: var(--jb-serif); font-weight: 300; font-size: clamp(34px, 4.6vw, 70px); line-height: 1.02; letter-spacing: -0.02em; max-width: 18ch; }
.w-fsub { font-family: var(--jb-serif); font-style: italic; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.35; color: #4A1E37; max-width: 40ch; transition: color 600ms ease; }
.w-read { margin-top: 12px; font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #4A1E37; transition: color 600ms ease; }
.w-feature:hover .w-date, .w-feature:hover .w-read { color: #B89561; }
.w-feature:hover .w-fsub { color: #E8DCC4; }
.w-list { border-top: 1px solid rgba(140,107,62,0.3); }
.w-row { display: grid; grid-template-columns: 180px 1fr 40px; gap: 24px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid rgba(140,107,62,0.3); color: #2A2723; text-decoration: none; }
.w-tt { display: flex; flex-direction: column; gap: 6px; transition: transform 600ms var(--jb-ease); }
.w-tt b { font-family: var(--jb-serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; }
.w-tt em { font-family: var(--jb-serif); font-size: 19px; color: #7D7461; }
.w-arrow { font-size: 22px; color: #8C6B3E; transition: transform 600ms var(--jb-ease); }
.w-row:hover .w-tt { transform: translateX(10px); }
.w-row:hover .w-arrow { transform: translateX(6px); color: #4A1E37; }
.w-all { margin: 34px 0 0; }
.w-all a { font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #4A1E37; text-decoration: none; border-bottom: 1px solid rgba(74,30,55,0.4); padding-bottom: 6px; }

/* Home: read-along band */
.jb-readalong { background: #F2E9DA; padding: clamp(90px, 10vw, 150px) var(--gut); }
.jb-readalong-in { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.jb-readalong-title { margin: 0; font-family: var(--jb-serif); font-weight: 300; font-size: clamp(40px, 5vw, 76px); line-height: 1; letter-spacing: -0.02em; color: #2A2723; }
.jb-readalong-title em { font-style: italic; color: #4A1E37; }
.jb-readalong-text { margin: 0; max-width: 44ch; font-size: 17px; line-height: 1.7; color: rgba(42,39,35,0.75); }
.jb-readalong .jb-sub { margin-top: 10px; }
.jb-readalong-latest { margin: 8px 0 0; font-family: var(--jb-serif); font-style: italic; font-size: 18px; color: #7D7461; }
.jb-readalong-latest a { color: #4A1E37; text-decoration: none; border-bottom: 1px solid rgba(74,30,55,0.3); }

/* Footer subscribe (on plum) */
.jb-footer-sub { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.jb-footer-sub p { margin: 0; font-family: var(--jb-serif); font-style: italic; font-size: 18px; color: #E8DCC4; }
.jb-sub--foot { border-color: rgba(242,231,210,0.35); }
.jb-sub--foot:focus-within { border-color: #B89561; }
.jb-sub--foot input { color: #F7F1E6; padding: 12px 0; font-size: 15px; }
.jb-sub--foot input::placeholder { color: rgba(242,231,210,0.5); }
.jb-sub--foot button { color: #B89561; }
.jb-sub--foot button:hover { color: #F2E7D2; }

/* Manifesto: keep reading */
.m-subscribe { background: #F2E9DA; padding: clamp(80px, 9vw, 130px) var(--gut); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.m-sub-title { margin: 0; font-family: var(--jb-serif); font-weight: 300; font-size: clamp(32px, 3.8vw, 56px); line-height: 1.05; color: #2A2723; }
.m-sub-title em { font-style: italic; color: #4A1E37; }

@media (max-width: 760px) {
	.w-row { grid-template-columns: 1fr 24px; gap: 8px; }
	.w-date { grid-column: 1 / -1; }
}

/* ---------- Blog post (single essay) ---------- */
.jb-post { background: #FAF6EF; color: #2A2723; padding-bottom: clamp(80px, 10vw, 140px); }
.jb-post-head { max-width: 860px; margin: 0 auto; padding: calc(var(--headerH) + clamp(56px, 8vw, 120px)) var(--gut) clamp(36px, 4vw, 56px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.jb-post-back { margin: 0; } .jb-post-back a { font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #8C6B3E; text-decoration: none; }
.jb-post-date { font-family: var(--jb-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #8C6B3E; }
.jb-post-h1 { margin: 0; font-family: var(--jb-serif); font-weight: 300; font-size: clamp(42px, 6vw, 88px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.jb-post-sub, .jb-post-sub p { margin: 0; font-family: var(--jb-serif); font-style: italic; font-size: clamp(21px, 2vw, 28px); line-height: 1.35; color: #4A1E37; max-width: 34ch; }
.jb-post-image { max-width: 1100px; margin: 0 auto clamp(40px, 5vw, 70px); padding: 0 var(--gut); }
.jb-post-image img { width: 100%; height: auto; display: block; }
.jb-post-wrap { max-width: 680px; margin: 0 auto; padding: 0 var(--gut); }
.jb-post-body { font-size: 18.5px; line-height: 1.8; color: rgba(42,39,35,0.88); }
.jb-post-body > * + * { margin-top: 1.3em; }
.jb-post-body p { margin: 0 0 1.3em; }
.jb-post-body h2, .jb-post-body h3 { margin-bottom: 0.6em; }
.jb-post-body > p:first-child::first-letter, .jb-post-body > .jb-demo-note + p::first-letter { float: left; font-family: var(--jb-serif); font-size: 4.4em; line-height: 0.82; padding: 0.06em 0.12em 0 0; color: #4A1E37; }
.jb-post-body h2 { margin-top: 2em; font-family: var(--jb-serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.15; color: #2A2723; }
.jb-post-body h3 { margin-top: 1.8em; font-family: var(--jb-serif); font-weight: 500; font-size: 26px; color: #2A2723; }
.jb-post-body blockquote { margin: 2em 0; padding: 0 0 0 28px; border-left: 1px solid #B89561; font-family: var(--jb-serif); font-style: italic; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.35; color: #4A1E37; }
.jb-post-body blockquote p { margin: 0; }
.jb-post-body a { color: #4A1E37; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(74,30,55,0.35); }
.jb-post-body ul, .jb-post-body ol { padding-left: 22px; } .jb-post-body li::marker { color: #B89561; }
.jb-post-body hr { border: 0; text-align: center; margin: 2.4em 0; } .jb-post-body hr::after { content: "· · ·"; letter-spacing: 0.6em; color: #B89561; }
.jb-post-source { margin: 48px 0 0; padding-top: 22px; border-top: 1px solid rgba(140,107,62,0.3); font-family: var(--jb-serif); font-style: italic; font-size: 19px; color: #7D7461; }
.jb-post-source a { color: #4A1E37; }
.jb-post-end { margin: 56px 0 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.jb-post-end > div { background: #F2E9DA; padding: clamp(32px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; }
.jb-post-end-title { margin: 0; font-family: var(--jb-serif); font-weight: 300; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.1; }
.jb-post-end-title em { font-style: italic; color: #4A1E37; }
.jb-post-end-text { margin: 0; font-size: 16.5px; line-height: 1.7; color: rgba(42,39,35,0.8); max-width: 46ch; }
.jb-post-end-work { background: #4A1E37 !important; }
.jb-post-end-work .jb-eyebrow { color: #B89561 !important; }
.jb-post-end-work .jb-post-end-text { color: rgba(242,231,210,0.88); }
.jb-post-end-work .jb-line-link { color: #F2E7D2; border-color: rgba(242,231,210,0.4); align-self: flex-start; }
.jb-post-nav { margin-top: 48px; display: flex; justify-content: space-between; gap: 24px; font-family: var(--jb-serif); font-size: 19px; }
.jb-post-nav a { color: #4A1E37; text-decoration: none; }
.w-date small { font-size: 10px; letter-spacing: 0.16em; color: #A39A84; }
.jb-demo-note { padding: 14px 18px; background: rgba(184,149,97,0.18); font-size: 14px !important; line-height: 1.55 !important; color: #7D7461 !important; }
.jb-demo-note::first-letter { float: none !important; font-size: inherit !important; padding: 0 !important; color: inherit !important; font-family: inherit !important; }
.w-preview-link { margin: 26px 0 0; } .w-preview-link a { font-family: var(--jb-serif); font-style: italic; font-size: 18px; color: #8C6B3E; }

/* Read along: longer title + text */
.jb-readalong-in { max-width: 820px; }
.jb-readalong-title { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.08; text-wrap: balance; }
.jb-readalong-text { max-width: 52ch; text-wrap: pretty; }
