/* =========================================================
   Journey: article.css (ours, not WordPress's)
   The blog index (.jb) and its articles (.ja-article): a centred
   headline and byline, a demo, the body beside a sticky table of
   contents, then questions, a call to action and more to read.
   Uses global.css's tokens only. Loads after blog.css, before refinements.css.
   ========================================================= */

.site-content.ja { display: block; padding: 0; }
.ja { --ja-measure: 720px; --ja-wide: 1160px; color: var(--ink); }
.ja [hidden] { display: none !important; }
.ja-label {
	font: 600 12px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--ink-mute); margin: 0 0 18px;
}

/* ---------- article header ---------- */
.ja-head { max-width: var(--ja-wide); margin: 0 auto; padding: 72px 24px 0; text-align: center; }
.ja-crumbs { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 26px; }
.ja-crumbs a { color: var(--ink-mute); }
.ja-crumbs a:hover { color: var(--olive); }
.ja-head h1 {
	font: 500 clamp(34px, 4.6vw, 56px)/1.08 var(--serif); letter-spacing: -0.025em;
	margin: 0 auto 30px; max-width: 880px; color: var(--ink);
}
.ja-byline { display: inline-flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 30px; }
.ja-byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ja-byline b { display: block; font-size: 15px; font-weight: 600; }
.ja-byline span { display: block; font-size: 14px; color: var(--ink-mute); }
.ja-meta {
	display: flex; justify-content: space-between; max-width: var(--ja-wide); margin: 0 auto;
	font-size: 14px; color: var(--ink-mute); padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.ja-dek {
	text-align: left; font-size: clamp(19px, 2vw, 23px); line-height: 1.45; color: var(--ink-mute);
	max-width: var(--ja-wide); margin: 28px auto 0;
}

/* ---------- demos ---------- */
.ja-demo { margin: 36px 0; }
.ja-demo video {
	display: block; width: 100%; height: auto; border-radius: 18px; background: var(--bg-card);
	border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(47, 62, 14, 0.35); cursor: pointer;
}
.ja-demo.is-square video { max-width: 560px; margin: 0 auto; }
.ja-demo.is-tall video { max-width: 340px; margin: 0 auto; }
.ja-hero.is-square video { max-width: 620px; }
.ja-demo.is-square figcaption, .ja-demo.is-tall figcaption { text-align: center; }
.ja-demo figcaption { font-size: 14px; line-height: 1.5; color: var(--ink-mute); margin-top: 12px; }
.ja-demo figcaption::before {
	content: "Demo"; display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 6px;
	background: var(--gold-soft); color: var(--gold-deep); font-size: 11px; font-weight: 600;
	letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px;
}
.ja-hero { max-width: var(--ja-wide); margin: 36px auto 0; padding: 0 24px; }
.ja-hero video { box-sizing: border-box; }

/* ---------- body + table of contents ---------- */
.ja-grid {
	max-width: var(--ja-wide); margin: 0 auto; padding: 56px 24px 24px;
	display: grid; grid-template-columns: minmax(0, var(--ja-measure)) 300px; gap: 80px; justify-content: space-between;
}
.ja-toc {
	position: sticky; top: calc(var(--nav-height) + 28px); align-self: start;
	border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; background: #fff;
	max-height: calc(100vh - var(--nav-height) - 56px); overflow: auto;
}
.ja-toc ol { list-style: none; margin: 0; padding: 0; }
.ja-toc li { margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.ja-toc a { color: var(--ink-mute); text-decoration: none; display: block; padding-left: 12px; border-left: 2px solid transparent; }
.ja-toc a:hover { color: var(--ink); }
.ja-toc a.is-on { color: var(--olive); border-left-color: var(--olive); font-weight: 500; }

.ja-takeaways {
	background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 16px;
	padding: 24px 26px 8px; margin-bottom: 40px;
}
.ja-takeaways .ja-label { margin-bottom: 14px; color: var(--olive); }
.ja-takeaways ul { margin: 0 0 16px 1.1em; padding: 0; }
.ja-takeaways li { font-size: 16.5px; line-height: 1.55; margin-bottom: 10px; color: var(--ink); }

.ja-prose { font: 400 18px/1.72 var(--sans); color: #1d1d1b; }
.ja-prose > * { max-width: var(--ja-measure); }
.ja-prose p { margin: 0 0 1.2em; }
.ja-prose h2 {
	font: 500 clamp(26px, 2.6vw, 32px)/1.2 var(--serif); letter-spacing: -0.015em; color: var(--ink);
	margin: 2.1em 0 0.6em; scroll-margin-top: calc(var(--nav-height) + 24px);
}
.ja-prose > h2:first-child { margin-top: 0; }
.ja-prose h3 { font: 600 20px/1.35 var(--sans); color: var(--ink); margin: 1.8em 0 0.5em; scroll-margin-top: calc(var(--nav-height) + 24px); }
.ja-prose h4 { font: 600 17px/1.4 var(--sans); margin: 1.5em 0 0.4em; }
.ja-prose a { color: var(--olive); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ja-prose a:hover { color: var(--olive-deep); }
.ja-prose ul, .ja-prose ol { margin: 0 0 1.3em 1.3em; padding: 0; }
.ja-prose li { margin-bottom: 0.45em; }
.ja-prose strong { font-weight: 600; color: var(--ink); }
.ja-prose blockquote {
	border: 0; border-left: 3px solid var(--gold); margin: 1.6em 0; padding: 4px 0 4px 22px;
	font: italic 400 21px/1.5 var(--serif); color: var(--ink);
}
.ja-prose blockquote cite { display: block; margin-top: 10px; font: normal 500 14px/1.4 var(--sans); color: var(--ink-mute); }

/* tables */
.ja-prose .ja-table { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 14px; }
.ja-prose table { width: 100%; border: 0; border-collapse: collapse; margin: 0; font-size: 15.5px; line-height: 1.5; }
.ja-prose th, .ja-prose td { border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; text-align: left; vertical-align: top; }
.ja-prose th { background: var(--bg-card-soft); font-weight: 600; color: var(--ink); }
.ja-prose tr:last-child td { border-bottom: 0; }

/* callouts */
.ja-note, .ja-option {
	border-radius: 14px; padding: 20px 22px; margin: 1.8em 0; font-size: 16.5px; line-height: 1.6;
	background: var(--bg-card-soft); border: 1px solid var(--line);
}
.ja-note > :last-child, .ja-option > :last-child { margin-bottom: 0; }
.ja-option { background: #fff; border-left: 4px solid var(--olive); }
.ja-note b:first-child, .ja-option b:first-child { display: block; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--olive); margin-bottom: 6px; }

/* steps */
.ja-prose ol.ja-steps { list-style: none; margin-left: 0; counter-reset: s; }
.ja-prose ol.ja-steps > li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 1em; }
.ja-prose ol.ja-steps > li::before {
	content: counter(s); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%;
	background: var(--olive-soft); color: var(--olive-deep); font: 600 14px/30px var(--sans); text-align: center;
}

/* a text thread, as the Messages screen on the student's phone (built by phoneTag() in lib/articles.ts) */
.ja-phone { width: 340px; max-width: 100% !important; margin: 2.6em auto 0.9em; }
.ja-phone-body {
	background: linear-gradient(160deg, #3a3a3d, #1c1c1e 40%, #2a2a2d); border-radius: 56px; padding: 11px;
	box-shadow: inset 0 0 0 1.5px #55555a, inset 0 0 0 3px #111, 0 50px 80px -46px rgba(0, 0, 0, 0.55);
}
.ja-phone-screen {
	position: relative; height: 660px; background: #fff; border-radius: 46px; overflow: hidden; color: #000;
	font: 400 15.5px/1.32 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", var(--sans); letter-spacing: -0.01em;
}
.ja-phone-screen::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 120px; height: 5px; margin-left: -60px; border-radius: 9px; background: #000; z-index: 4; }
.ja-sbar { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 50px; display: flex; justify-content: space-between; align-items: center; padding: 4px 26px 0 36px; font-weight: 600; font-size: 15px; }
.ja-isl { position: absolute; left: 50%; top: 11px; width: 104px; height: 30px; margin-left: -52px; border-radius: 20px; background: #000; }
.ja-sic { display: flex; align-items: center; gap: 5px; }
.ja-sic svg { display: block; height: 11px; width: auto; fill: currentColor; color: #000; }
.ja-sic svg:last-child { height: 12px; }
.ja-sic b { font-size: 12px; font-weight: 600; }
.ja-mhead {
	position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 132px; padding-top: 54px; text-align: center;
	background: rgba(246, 246, 248, 0.92); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
	box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.16);
}
.ja-mhead img { display: block; width: 50px; height: 50px; margin: 0 auto 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0.6px rgba(0, 0, 0, 0.12); padding: 3px; box-sizing: border-box; }
.ja-who { font-size: 12px; color: #111; }
.ja-who::after { content: " ›"; color: #9a9aa0; }
.ja-back { position: absolute; left: 18px; top: 66px; width: 12px; height: 12px; border-left: 2.6px solid #0A7AFF; border-bottom: 2.6px solid #0A7AFF; transform: rotate(45deg); border-radius: 1px; }
.ja-msgs {
	position: absolute; left: 0; right: 0; top: 132px; bottom: 74px; overflow-y: auto; padding: 8px 14px 10px 16px;
	display: flex; flex-direction: column; scrollbar-width: none; scroll-behavior: smooth;
}
.ja-msgs::-webkit-scrollbar { display: none; }
.ja-phone .ja-msgs > p { margin: 0; max-width: 76%; }
.ja-phone .ja-day { align-self: center; max-width: none !important; text-align: center; font-size: 11.5px; line-height: 1.35; color: #8E8E93; margin: 10px 0 8px !important; }
.ja-phone .ja-day b { font-weight: 600; }
.ja-b { position: relative; padding: 7px 12px 8px; border-radius: 18px; white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 2px !important; }
.ja-b.in { align-self: flex-start; background: #E9E9EB; color: #000; }
.ja-b.out { align-self: flex-end; background: #34C759; color: #fff; }
.ja-b.tail { margin-bottom: 8px !important; }
.ja-b.tail::before, .ja-b.tail::after { content: ""; position: absolute; bottom: 0; height: 17px; }
.ja-b.in.tail::before { left: -7px; width: 17px; background: #E9E9EB; border-bottom-right-radius: 15px; }
.ja-b.in.tail::after { left: -10px; width: 10px; background: #fff; border-bottom-right-radius: 10px; }
.ja-b.out.tail::before { right: -7px; width: 17px; background: #34C759; border-bottom-left-radius: 15px; }
.ja-b.out.tail::after { right: -10px; width: 10px; background: #fff; border-bottom-left-radius: 10px; }
.ja-b a { color: inherit; }
.ja-inp { position: absolute; z-index: 2; left: 0; right: 0; bottom: 22px; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; background: #fff; }
.ja-plus { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #EDEDF0; position: relative; }
.ja-plus::before, .ja-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.4px; margin: -1.2px 0 0 -7px; border-radius: 2px; background: #7A7A80; }
.ja-plus::after { transform: rotate(90deg); }
.ja-fld { flex: 1; min-width: 0; height: 34px; border-radius: 17px; box-shadow: inset 0 0 0 1px #D1D1D6; display: flex; align-items: center; padding: 0 40px 0 13px; color: #C2C2C7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-send {
	position: absolute; right: 13px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
	background: #34C759; border: 0; padding: 0; cursor: pointer; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; pointer-events: none;
}
.ja-send::before { content: ""; position: absolute; left: 50%; top: 8px; width: 9px; height: 9px; margin-left: -5px; border-left: 2.6px solid #fff; border-top: 2.6px solid #fff; transform: rotate(45deg); }
.ja-send::after { content: ""; position: absolute; left: 50%; top: 8px; width: 2.6px; height: 13px; margin-left: -1.3px; background: #fff; border-radius: 2px; }
.ja-inp.ready .ja-fld { color: #000; }
.ja-inp.ready .ja-send { opacity: 1; transform: scale(1); pointer-events: auto; animation: ja-pulse 1.4s ease-in-out infinite; }
.ja-hint { position: absolute; z-index: 3; right: 10px; bottom: 74px; background: rgba(0, 0, 0, 0.78); color: #fff; font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 999px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.ja-inp.ready ~ .ja-hint { opacity: 1; }
@keyframes ja-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } }
.ja-wait { display: none !important; }
.ja-pop { animation: ja-pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.ja-b.in.ja-pop { transform-origin: 0 100%; }
.ja-b.out.ja-pop { transform-origin: 100% 100%; }
@keyframes ja-pop { from { opacity: 0; transform: scale(0.6) translateY(8px); } to { opacity: 1; transform: none; } }
.ja-typing { display: flex !important; gap: 4px; align-items: center; padding: 11px 13px !important; }
.ja-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a9aa0; animation: ja-dot 1.1s infinite ease-in-out; }
.ja-typing i:nth-child(2) { animation-delay: 0.15s; }
.ja-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ja-dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.ja-replay {
	display: block; margin: 14px auto 0; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
	font: 500 13px var(--sans); color: var(--ink-mute); cursor: pointer;
}
.ja-replay:hover { color: var(--ink); border-color: var(--gold-cta); background: #fff; }
.ja-cap { font-size: 14px; color: var(--ink-mute); margin: 0 auto 2.2em !important; max-width: 420px !important; text-align: center; }

/* questions */
.ja-faq { margin-top: 56px; max-width: var(--ja-measure); scroll-margin-top: calc(var(--nav-height) + 24px); }
.ja-faq h2 { font: 500 clamp(26px, 2.6vw, 32px)/1.2 var(--serif); margin: 0 0 12px; }
.ja-faq details { border-bottom: 1px solid var(--line); }
.ja-faq summary {
	list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
	font: 600 17px/1.45 var(--sans); color: var(--ink);
}
.ja-faq summary::-webkit-details-marker { display: none; }
.ja-faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 300 26px/1 var(--sans); color: var(--ink-mute); }
.ja-faq details[open] summary::after { content: "–"; }
.ja-faq details p { margin: 0 0 22px; font-size: 16.5px; line-height: 1.65; color: #333; }

/* ---------- call to action ---------- */
.ja-cta { background: radial-gradient(120% 140% at 15% 0%, #4A5A1F 0%, #2F3E0E 55%, #1F2A08 100%); color: #fff; margin-top: 72px; }
.ja-cta-in { max-width: var(--ja-wide); margin: 0 auto; padding: 84px 24px; }
.ja-cta h2 { font: 500 clamp(32px, 4vw, 48px)/1.1 var(--serif); letter-spacing: -0.02em; margin: 0 0 14px; color: #fff; }
.ja-cta p { font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.78); max-width: 560px; margin: 0 0 30px; }
.ja-btn {
	display: inline-block; background: var(--gold-cta); color: var(--ink); border-radius: 999px;
	padding: 14px 24px; font: 600 15px/1 var(--sans); text-decoration: none; transition: background 0.15s;
}
.ja-btn:hover { background: var(--gold-cta-deep); color: var(--ink); }

/* ---------- keep reading ---------- */
.ja-more-in { max-width: var(--ja-wide); margin: 0 auto; padding: 64px 24px 88px; }
.ja-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ja-card { display: block; color: var(--ink); text-decoration: none; }
.ja-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-card); margin-bottom: 14px; transition: transform 0.2s; }
.ja-card:hover img { transform: translateY(-3px); }
.ja-cat { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--olive); margin-bottom: 6px; }
.ja-card b { font: 500 20px/1.3 var(--serif); }

/* =========================================================
   Blog index (.jb)
   ========================================================= */
.jb { max-width: var(--ja-wide); margin: 0 auto; padding: 72px 24px 0; }
.jb-hero h1 { font: 500 clamp(40px, 5.4vw, 64px)/1.04 var(--serif); letter-spacing: -0.03em; margin: 0 0 18px; max-width: 760px; }
.jb-sub { font-size: 19px; line-height: 1.55; color: var(--ink-mute); max-width: 620px; margin: 0; }
.jb-lead { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 26px; }
.jb-lead-card { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; color: var(--ink); text-decoration: none; }
.jb-lead-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-card); }
.jb-kicker { display: flex; gap: 12px; align-items: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 16px; }
.jb-kicker span { color: var(--olive); font-weight: 600; }
.jb-kicker span::after { content: "·"; margin-left: 12px; color: var(--ink-soft); }
.jb-lead-card h2 { font: 500 clamp(28px, 3.2vw, 40px)/1.12 var(--serif); letter-spacing: -0.02em; margin: 0 0 16px; }
.jb-lead-dek { font-size: 17.5px; line-height: 1.6; color: var(--ink-mute); margin: 0 0 26px; }
.jb-lead-card:hover h2 { color: var(--olive); }

.jb-list { margin-top: 72px; }
.jb-bar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.jb-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.jb-tabs button {
	background: none; border: 1px solid transparent; color: var(--ink-mute); border-radius: 999px;
	padding: 8px 14px; font: 500 14px/1 var(--sans); cursor: pointer;
}
.jb-tabs button:hover { color: var(--ink); background: var(--bg-card-soft); }
.jb-tabs button[aria-selected="true"] { background: var(--olive); color: #fff; }
.jb-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: #fff; min-width: 260px; }
.jb-search svg { width: 16px; height: 16px; color: var(--ink-soft); flex: none; }
.jb-search input { border: 0 !important; outline: none; background: none; padding: 6px 0 !important; font: 400 15px var(--sans); width: 100%; color: var(--ink); }
.jb-filter { font-size: 14px; color: var(--ink-mute); margin: 16px 0 0; }
.jb-filter button { background: none; border: 0; color: var(--olive); text-decoration: underline; padding: 0 0 0 6px; cursor: pointer; font: inherit; }

.jb-rows { list-style: none; margin: 0; padding: 0; }
.jb-rows li { border-bottom: 1px solid var(--line); }
.jb-rows a { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 26px 0; color: var(--ink); text-decoration: none; }
.jb-when { font-size: 13.5px; color: var(--ink-mute); line-height: 1.5; padding-top: 4px; }
.jb-when span { display: block; color: var(--olive); font-weight: 600; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 4px; }
.jb-what h3 { display: block; font: 500 22px/1.3 var(--serif); margin: 0 0 6px; color: var(--ink); letter-spacing: 0; }
.jb-what span { display: block; font-size: 16px; line-height: 1.55; color: var(--ink-mute); max-width: 760px; }
.jb-rows a:hover h3 { color: var(--olive); }
.jb-empty { padding: 40px 0; color: var(--ink-mute); }

/* ---------- smaller screens ---------- */
@media (max-width: 1024px) {
	.ja-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 40px; }
	.ja-toc { display: none; }
	.ja-prose > *, .ja-faq { max-width: none; }
}
@media (max-width: 860px) {
	.jb-lead-card { grid-template-columns: 1fr; gap: 24px; }
	.ja-cards { grid-template-columns: 1fr; gap: 32px; }
	.jb-rows a { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
	.jb-when { display: flex; gap: 10px; align-items: baseline; padding: 0; }
	.jb-when span { margin: 0; }
}
@media (max-width: 640px) {
	.ja-head { padding: 40px 16px 0; }
	.ja-head h1 { margin-bottom: 22px; }
	.ja-meta { padding-left: 0; padding-right: 0; }
	.ja-hero, .ja-grid, .ja-more-in, .ja-cta-in, .jb { padding-left: 16px; padding-right: 16px; }
	.ja-hero video, .ja-demo video { border-radius: 12px; }
	.ja-prose { font-size: 17px; }
	.ja-phone { width: 300px; }
	.ja-phone-screen { height: 600px; }
	.jb { padding-top: 40px; }
	.jb-search { min-width: 0; width: 100%; }
	.jb-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
	.jb-tabs button { flex: none; }
	.ja-cta-in { padding-top: 60px; padding-bottom: 60px; }
}
