/* journal.css (owner: journal agent, rounds 4 and 5): the journal index (.jx-*) and the article page (.ja-*, plus the body
   blocks .jt table, .jsteps steps, .jl list, .jp product, .ji ingredient, .jf FAQ, and the .jr-motion cover loop). Loaded
   instead of story.css on journal pages. Tokens only (the product neon arrives as --c). Easing from base.css: settle,
   recede, draw. Round 5 removed the maker box (.ja-maker). */

.jx .crumbs, .ja .crumbs { padding-top: 26px; }

/* ================================================================ shared bits */
.jx-kicker, .ja-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.jx-kicker a, .ja-kicker a { display: inline-block; padding: 6px 0; margin: -6px 0; color: inherit; text-decoration: none; } /* a 24 px target on a 12 px line (WCAG 2.5.8) */
.jx-kicker a:hover, .ja-kicker a:hover { text-decoration: underline; text-underline-offset: 4px; }
.jx-kicker span { color: var(--text-2); }
.jx-kicker i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.jx-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 16px 0 0; font-size: 13.5px; letter-spacing: .03em; color: var(--text-2); }
.jx-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.jx-dek { margin: 12px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--text-2); max-width: 52ch; }

/* ================================================================ index */
.jx-head-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 24px 40px; align-items: end; padding: 46px 0 38px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.jx-h1 { font-size: clamp(56px, 6.4vw, 104px); line-height: .94; letter-spacing: -.028em; }
.jx-lede { color: var(--text); opacity: .86; max-width: 52ch; }

.jx-feat { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.jx-feat-media, .jx-card-media { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); background: var(--bg-2); }
.jx-feat-media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.4s var(--settle); }
.jx-feat:hover .jx-feat-media img, .jx-card:hover .jx-card-media img { transform: scale(1.03); }
.jx-feat-h { margin: 16px 0 0; font: 300 clamp(36px, 3.4vw, 54px)/1.04 var(--display); letter-spacing: -.015em; }
.jx-feat-h a, .jx-card-h a { text-decoration: none; }
.jx-feat-h a:hover, .jx-card-h a:hover { color: var(--accent); }
.jx-feat-answer { margin: 18px 0 0; padding-left: 16px; border-left: 1px solid var(--accent); font-size: 16.5px; line-height: 1.62; color: var(--text); opacity: .9; max-width: 56ch; }
.jx-feat-answer b { font-weight: 600; }
.jx-prods { display: flex; align-items: flex-end; gap: 12px; height: 46px; margin: 20px 0 22px; }
.jx-prods a { display: flex; align-items: flex-end; height: 100%; }
.jx-prods img { max-height: 46px; width: auto; filter: drop-shadow(0 3px 4px rgb(var(--shade) / .55)); transition: transform .5s var(--settle); }
.jx-prods a:hover img { transform: translateY(-3px); }
.jx-feat .arrow-link { margin-top: 4px; }

.jx-all { position: relative; margin-top: clamp(64px, 7vw, 104px); padding-top: 34px; border-top: 1px solid var(--line); }
.jx-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: calc(var(--hdr-h) + 18px); }
.jx-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 30px; }
.jx-all-h { margin: 0; font: 400 clamp(24px, 2vw, 30px)/1.15 var(--display); }
.jx-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.jx-filter .chip { height: 36px; padding: 0 14px; font-size: 13.5px; }
.jx-blurb { display: none; margin: 18px 0 0; font-size: 15.5px; color: var(--text-2); max-width: 64ch; }
.jx-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 26px; }
.jx-card { display: grid; align-content: start; gap: 0; }
.jx-card-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.4s var(--settle); }
.jx-card .jx-kicker { margin-top: 18px; margin-bottom: 3px; } /* room for the topic link's 24 px target above the title */
.jx-card-h { margin: 10px 0 0; font: 300 clamp(26px, 2.1vw, 32px)/1.1 var(--display); letter-spacing: -.008em; text-wrap: balance; }

/* ================================================================ article */
.art-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 40; height: 2px; pointer-events: none; }
.art-progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

.ja-head-in { max-width: 940px; padding: 46px 0 0; }
.ja-h1 { margin: 16px 0 0; font: 300 clamp(46px, 5.4vw, 86px)/.98 var(--display); letter-spacing: -.026em; text-wrap: balance; }
.ja-dek { margin: 22px 0 0; font: 300 clamp(20px, 1.7vw, 25px)/1.45 var(--display); color: var(--text); opacity: .84; max-width: 50ch; }
.ja-by { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 24px 0 0; font-size: 13.5px; letter-spacing: .02em; color: var(--text-2); }
.ja-by span + span::before { content: ''; display: inline-block; width: 3px; height: 3px; margin: 0 12px; vertical-align: middle; border-radius: 50%; background: var(--text-3); }
.ja-by a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 4px; }

.ja-answer { max-width: 940px; margin: 34px 0 40px; padding: 26px 30px 28px; background: var(--bg-2); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--radius); }
.ja-answer-h { margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ja-answer p { margin: 14px 0 0; font: 300 clamp(19px, 1.5vw, 23px)/1.5 var(--display); color: var(--text); }

.ja-cover { position: relative; margin: 0 auto; }
.ja-cover img { width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }

/* Round 5 (#71): a motion loop laid over a cover still (Violet Hour only; c.motion() prints nothing until the lead maps
   the cover base to a clip in motion.json). It takes the still's exact box: the figure is a .wrap, so the box is the
   content box inside the gutters, and the height follows the still's aspect-ratio (21:9, 16:10 on phones). Same
   object-fit and corners, never catches the pointer. Reduced motion hides video.motion (base.css). */
.ja-cover .jr-motion { position: absolute; top: 0; left: var(--gut); width: calc(100% - 2 * var(--gut)); height: 100%; max-width: none; object-fit: cover; border-radius: var(--radius); pointer-events: none; }
.jx-feat-media { position: relative; }
.jx-feat-media .jr-motion { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; transition: transform 1.4s var(--settle); }
.jx-feat:hover .jx-feat-media .jr-motion { transform: scale(1.03); }

.ja-grid { display: grid; grid-template-columns: minmax(210px, 260px) minmax(0, 740px); justify-content: center; gap: clamp(40px, 6vw, 96px); padding-top: clamp(48px, 5vw, 76px); }
.ja-side { position: sticky; top: calc(var(--hdr-h) + 24px); align-self: start; max-height: calc(100vh - var(--hdr-h) - 48px); overflow: auto; scrollbar-width: thin; }
.ja-side-h { margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.ja-toc ol { list-style: none; margin: 0 0 32px; padding: 0; border-left: 1px solid var(--line); }
.ja-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; line-height: 1.4; color: var(--text-2); text-decoration: none; transition: color .3s, border-color .3s; }
.ja-toc a:hover { color: var(--text); }
.ja-toc a[aria-current] { color: var(--text); border-left-color: var(--accent); }
.ja-plist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ja-plist li { border-bottom: 1px solid var(--line); }
.ja-plist a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; }
.ja-pimg { display: grid; place-items: end center; height: 46px; }
.ja-pimg img { max-height: 46px; width: auto; filter: drop-shadow(0 3px 4px rgb(var(--shade) / .55)); }
.ja-plist b { display: block; font: 400 17px/1.15 var(--display); }
.ja-plist small { font-size: 13px; color: var(--text-2); }
.ja-plist a:hover b { color: var(--c); }

.ja-take { margin: 0 0 8px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.ja-take-h { margin: 0 0 10px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.ja-take ul { list-style: none; margin: 0; padding: 0; counter-reset: tk; }
.ja-take li { position: relative; padding: 11px 0 11px 34px; font-size: 17px; line-height: 1.55; border-bottom: 1px solid var(--line); counter-increment: tk; }
.ja-take li:last-child { border-bottom: 0; }
.ja-take li::before { content: counter(tk); position: absolute; left: 0; top: 13px; font: 400 12px/1.4 var(--mono); color: var(--accent); }

/* the article body */
.ja-body { max-width: none; font-size: 17.5px; line-height: 1.75; }
.ja-body > p:first-child { margin-top: 0; }
.ja-body h2 { margin: 1.9em 0 .55em; font: 300 clamp(28px, 2.4vw, 34px)/1.15 var(--display); letter-spacing: -.01em; scroll-margin-top: calc(var(--hdr-h) + 20px); }
.ja-body h3 { margin: 1.6em 0 .5em; font: 600 16px/1.35 var(--sans); letter-spacing: .02em; }
.ja-body a { text-decoration-color: var(--accent); text-underline-offset: 4px; }
.ja-body a:hover { color: var(--accent); }
.ja-body .owner-line { margin: .4em 0 1.1em; }

.jl, .ja-body .jl { list-style: none; padding: 0; margin: 0 0 1.3em; border-top: 1px solid var(--line); }
.jl li { position: relative; margin: 0; padding: 11px 0 11px 26px; border-bottom: 1px solid var(--line); }
.jl li::before { content: ''; position: absolute; left: 0; top: 1.45em; width: 12px; height: 1px; background: var(--accent); }

.jsteps, .ja-body .jsteps { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 0; border-top: 1px solid var(--line); }
.jsteps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.jsteps-n { font: 300 26px/1 var(--display); color: var(--accent); letter-spacing: -.01em; }
.jsteps p { margin: 0; }
.jsteps strong { font-weight: 600; }

.jt { margin: 1.4em 0 1.8em; }
.jt-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); scrollbar-width: thin; }
.jt-scroll:focus-visible { outline-offset: 2px; }
.jt table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.55; }
.jt caption { caption-side: top; padding: 16px 18px 12px; text-align: left; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line); }
.jt thead th, .jt thead td { padding: 12px 18px; text-align: left; vertical-align: bottom; font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.jt tbody th, .jt tbody td { padding: 13px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.jt tbody tr:last-child th, .jt tbody tr:last-child td { border-bottom: 0; }
.jt tbody th { font-weight: 600; color: var(--text); width: 30%; }
.jt td { color: color-mix(in srgb, var(--text) 88%, var(--text-2)); }

.jc { margin: 1.6em 0; }
.jq p { font-size: clamp(26px, 2.4vw, 34px); }

/* inline product and ingredient cards */
.jp { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 22px; align-items: center; margin: 1.8em 0; padding: 18px 22px 18px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.jp-media { display: grid; place-items: center; height: 150px; border-radius: 2px; background: radial-gradient(70% 60% at 50% 72%, color-mix(in srgb, var(--c) 16%, transparent), transparent 72%), var(--bg-deep); text-decoration: none; }
.jp-media img { max-height: 132px; width: auto; filter: drop-shadow(0 10px 10px rgb(var(--shade) / .6)); transition: transform .6s var(--settle); }
.jp:hover .jp-media img { transform: translateY(-3px); }
.jp-txt p { margin: 0; }
.jp-kicker { font-size: 12px; letter-spacing: .04em; color: var(--text-2); }
.jp-name { margin-top: 6px !important; font: 300 26px/1.15 var(--display); }
.jp-name a { text-decoration: none; color: var(--text); }
.jp-name a:hover { color: var(--c); }
.jp-name span { display: block; margin-top: 2px; font: 400 14px/1.4 var(--sans); color: var(--text-2); }
.jp-note { margin-top: 10px !important; font-size: 15.5px; line-height: 1.6; color: var(--text); opacity: .88; }
.jp-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px !important; }
.ja-body .jp-act a { text-decoration: none; color: var(--text); }

.ji { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; margin: 1.6em 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.ji .por { border-radius: 2px; }
.ji-txt p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.55; }
.ji-name { font: 400 20px/1.2 var(--display) !important; }
.ji-name a { text-decoration: none; color: var(--text); }
.ji-name span { font-size: 11.5px; color: var(--text-2); }
.ji-where { font-size: 12px !important; color: var(--text-2); }

/* FAQ: visible text, not collapsed (assistants and readers both see every answer) */
.ja-faq { margin-top: clamp(54px, 5vw, 70px); padding-top: 34px; border-top: 1px solid var(--line-2); scroll-margin-top: calc(var(--hdr-h) + 20px); }
.ja-faq h2 { margin: 0 0 8px; font: 300 clamp(28px, 2.4vw, 34px)/1.15 var(--display); }
.jf-item { padding: 20px 0 6px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 20px); }
.jf-item:target .jf-q { color: var(--accent); }
.jf-q { margin: 0; font: 400 21px/1.35 var(--display); }
.jf-a { font-size: 16.5px; line-height: 1.7; color: color-mix(in srgb, var(--text) 88%, var(--text-2)); }
.jf-a p { margin: 8px 0 14px; max-width: 66ch; }

.ja-src { margin-top: 48px; scroll-margin-top: calc(var(--hdr-h) + 20px); }
.ja-src h2 { margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.ja-src ol { margin: 0; padding: 0 0 0 1.4em; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.ja-src li { margin: 0 0 9px; padding-left: 4px; }
.ja-src li::marker { font: 400 12px var(--mono); color: var(--text-3); }
.ja-src a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; overflow-wrap: anywhere; }
.ja-src a:hover { text-decoration-color: var(--accent); }
.ja-src li span { display: block; font-size: 13px; color: var(--text-3); }
.ja-src-note { margin: 18px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* after the article */
.ja-more, .ja-ings, .ja-next { padding-top: clamp(84px, 8vw, 120px); }
.ja-cards { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 300px)); gap: 22px; }
.ja-ing-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.ja-ing { display: block; text-decoration: none; }
.ja-ing .por { border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }
.ja-ing span { display: grid; gap: 4px; padding-top: 10px; }
.ja-ing b { font: 400 16px/1.2 var(--display); }
.ja-ing small { font-size: 10.5px; color: var(--text-2); overflow-wrap: anywhere; }
.ja-ing:hover b { color: var(--accent); }
.ja-next .jx-list { margin-top: 0; }

/* ================================================================ smaller screens */
@media (max-width: 1180px) {
  .jx-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ja-ing-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .jx-head-in, .jx-feat { grid-template-columns: 1fr; }
  .ja-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .ja-side { position: static; max-height: none; overflow: visible; }
  .ja-toc ol { margin-bottom: 0; }
  .ja-shop { display: none; }
  .ja-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .jx-head-in { padding: 34px 0 28px; margin-bottom: 30px; }
  .jx-list { grid-template-columns: 1fr; gap: 40px; }
  .jx-bar { align-items: flex-start; flex-direction: column; }
  .ja-head-in { padding-top: 30px; }
  .ja-by { gap: 4px 16px; }
  .ja-by span + span::before { display: none; }
  .ja-answer { margin: 26px 0 30px; padding: 20px 20px 22px; }
  .ja-cover img { aspect-ratio: 16 / 10; }
  .ja-ing-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ja-body { font-size: 17px; }
  .jp { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 14px; }
  .jp-media { height: 120px; }
  .jp-media img { max-height: 104px; }
  .jp-name { font-size: 22px; }
  /* tables with three or more columns become one card per row; two-column tables stay tables */
  .jt[data-cols="3"] thead, .jt[data-cols="4"] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .jt[data-cols="3"] table, .jt[data-cols="3"] tbody, .jt[data-cols="3"] tr, .jt[data-cols="3"] th, .jt[data-cols="3"] td,
  .jt[data-cols="4"] table, .jt[data-cols="4"] tbody, .jt[data-cols="4"] tr, .jt[data-cols="4"] th, .jt[data-cols="4"] td { display: block; width: auto; }
  .jt[data-cols="3"] caption, .jt[data-cols="4"] caption { display: block; }
  .jt[data-cols="3"] tr, .jt[data-cols="4"] tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .jt[data-cols="3"] tbody tr:last-child, .jt[data-cols="4"] tbody tr:last-child { border-bottom: 0; }
  .jt[data-cols="3"] tbody th, .jt[data-cols="3"] tbody td, .jt[data-cols="4"] tbody th, .jt[data-cols="4"] tbody td { padding: 3px 0; border: 0; }
  .jt[data-cols="3"] td[data-label]::before, .jt[data-cols="4"] td[data-label]::before { content: attr(data-label); display: block; font: 500 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  .jt tbody th, .jt tbody td, .jt thead th, .jt thead td { padding-left: 14px; padding-right: 14px; }
  .jt table { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .jx-feat-media img, .jx-card-media img, .jp-media img, .jx-prods img, .jx-feat-media .jr-motion { transition: none; }
}
