/* Journal: the listing (blog.php) and a story (blog-post.php). */

/* Small tracked line: category, date, reading time. */
.jn-meta { display: block; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--moss); }

/* ---- Listing: opener ---- */
.jn-title { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.jn-title__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: end; }
.jn-title__lede .lede { margin: 0 0 .6rem; max-width: 38ch; }
@media (max-width: 860px) { .jn-title__grid { grid-template-columns: 1fr; } }

/* ---- Listing: the newest story, photograph left, words right ---- */
.jn-feature__link {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: center;
  padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line);
}
.jn-feature__media { grid-column: 1 / span 7; aspect-ratio: 5 / 4; }
.jn-feature__body { grid-column: 8 / span 5; padding-left: clamp(0rem, 2vw, 2rem); display: grid; gap: 0; align-content: center; }
.jn-feature__body .eyebrow { margin-bottom: 2.2rem; }
.jn-feature__title {
  display: block; margin-top: 1.1rem;
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 2.9vw, 2.7rem); line-height: 1.08; letter-spacing: -.015em;
  color: var(--forest); text-wrap: balance;
}
.jn-feature__text { display: block; margin-top: 1.5rem; color: var(--ink-soft); font-size: .95rem; line-height: 1.8; max-width: 40ch; }
.jn-feature__body .link-line { margin-top: 2.2rem; }
.jn-feature__link:hover .link-line::after { width: 4.2rem; }
@media (max-width: 900px) {
  .jn-feature__link { grid-template-columns: 1fr; row-gap: 2rem; }
  .jn-feature__media, .jn-feature__body { grid-column: 1; }
  .jn-feature__media { aspect-ratio: 4 / 3; }
  .jn-feature__body { padding-left: 0; }
  .jn-feature__body .eyebrow { margin-bottom: 1.2rem; }
}

/* ---- Listing: the other stories as a numbered index ---- */
.jn-list__title {
  font-family: var(--sans); font-size: .7rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
  color: var(--moss); margin-bottom: 1.2rem;
}
.jn-index .index__row { grid-template-columns: 3rem minmax(0, 14rem) minmax(0, 1fr) auto; }
.jn-index .jn-meta { margin-bottom: .7rem; }
@media (max-width: 760px) { .jn-index .index__row { grid-template-columns: 1fr; } }

/* ---- Story: text-led opener ---- */
.jn-post__head { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.jn-crumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(2rem, 4vw, 3rem); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.jn-crumbs a:hover { color: var(--forest); }
.jn-crumbs span { color: var(--sage); }
.jn-post__headgrid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: end; }
.jn-post__head h1 { font-size: clamp(2.3rem, 4.3vw, 4rem); line-height: 1.04; }
.jn-post__aside-head { padding-bottom: .5rem; }
.jn-post__aside-head .lede { margin-top: 1.2rem; font-size: 1rem; }
@media (max-width: 900px) { .jn-post__headgrid { grid-template-columns: 1fr; } }

.jn-post__photo figcaption { margin-top: .8rem; font-size: .74rem; letter-spacing: .06em; color: var(--ink-soft); }

/* ---- Story: contents on the left, the text in a reading column ---- */
.jn-post__wrap { padding-top: clamp(3rem, 7vw, 6rem); }
.jn-post__layout { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; }
.jn-aside { grid-column: 1 / span 3; align-self: stretch; }
.jn-aside__inner { position: sticky; top: calc(var(--header-h) + 2rem); display: grid; gap: 2.8rem; }
.jn-body { grid-column: 5 / span 7; min-width: 0; }

.jn-aside__label {
  display: block; margin-bottom: 1rem;
  font-size: .64rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--moss);
}
.jn-toc ol { list-style: none; border-top: 1px solid var(--line); counter-reset: toc; }
.jn-toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.jn-toc a {
  display: grid; grid-template-columns: 1.8rem 1fr; gap: .4rem; padding: .7rem 0;
  font-size: .86rem; line-height: 1.45; color: var(--ink-soft); transition: color .25s var(--ease);
}
.jn-toc a::before { content: counter(toc, decimal-leading-zero); font-size: .62rem; letter-spacing: .14em; color: var(--sage); padding-top: .2rem; }
.jn-toc a:hover, .jn-toc a.is-active { color: var(--forest); }
.jn-toc a.is-active::before { color: var(--forest); }

.jn-plan { padding: 1.6rem 1.5rem 1.5rem; background: var(--mist); display: grid; gap: 1rem; }
.jn-plan .jn-aside__label { margin-bottom: 0; }
.jn-plan p { font-family: var(--serif); font-weight: 300; font-size: 1.12rem; line-height: 1.4; color: var(--forest); }
.jn-plan .btn { margin-top: .4rem; }
.jn-plan .link-line { justify-self: start; font-size: .66rem; }

@media (max-width: 1000px) {
  .jn-post__layout { grid-template-columns: 1fr; }
  .jn-aside, .jn-body { grid-column: 1; }
  .jn-aside { order: 2; margin-top: 4rem; }
  .jn-aside__inner { position: static; }
  .jn-toc { display: none; }
  .jn-body { max-width: 720px; }
}

/* The text itself. */
.jn-prose { font-size: 1.05rem; }
.jn-prose > p:first-child {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.45;
  color: var(--forest);
}
.jn-prose h2 { scroll-margin-top: calc(var(--header-h) + 1.5rem); padding-top: 1.6rem; border-top: 1px solid var(--line); }
.jn-prose .post-fig { margin-block: 2.4em; }
.jn-prose .post-fig img { width: 100%; }
.jn-prose .post-fig figcaption, .jn-prose figure figcaption { margin-top: .8rem; font-size: .76rem; letter-spacing: .04em; color: var(--ink-soft); }
.jn-prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5em; }
/* The collapsible sections blog_render() makes from "+##" headings. */
.jn-prose .fold { border-top: 1px solid var(--line); }
.jn-prose .fold:last-of-type { border-bottom: 1px solid var(--line); }
.jn-prose .fold__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.4rem; color: var(--forest); }
.jn-prose .fold__head::-webkit-details-marker { display: none; }
.jn-prose .fold__ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; transition: transform .3s var(--ease); flex: none; }
.jn-prose .fold[open] .fold__ic { transform: rotate(180deg); }
.jn-prose .fold__body { padding-bottom: 1.4rem; }
.jn-prose .fold__body > * + * { margin-top: 1em; }

/* Questions. */
.jn-faq { margin-top: clamp(3.5rem, 7vw, 5rem); }
.jn-faq h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-bottom: 1.6rem; }
.jn-faq__item { border-top: 1px solid var(--line); }
.jn-faq__item:last-child { border-bottom: 1px solid var(--line); }
.jn-faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.2rem 0; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; color: var(--forest);
}
.jn-faq__item summary::-webkit-details-marker { display: none; }
.jn-faq__ic { position: relative; flex: none; width: 14px; height: 14px; }
.jn-faq__ic::before, .jn-faq__ic::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--moss); transition: transform .35s var(--ease); }
.jn-faq__ic::after { transform: rotate(90deg); }
.jn-faq__item[open] .jn-faq__ic::after { transform: rotate(0); }
.jn-faq__item p { padding: 0 0 1.4rem; color: var(--ink-soft); max-width: 60ch; }

/* Author and sharing. */
.jn-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.6rem; border-top: 1px solid var(--forest);
}
.jn-author { display: flex; align-items: center; gap: 1rem; }
.jn-author img { width: 28px; height: auto; }
.jn-author strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--forest); line-height: 1.2; }
.jn-author span { font-size: .78rem; color: var(--ink-soft); }
.jn-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.4rem; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; }
.jn-share span { color: var(--sage); }
.jn-share a { color: var(--forest); border-bottom: 1px solid var(--line); padding-bottom: .15rem; transition: border-color .25s; }
.jn-share a:hover { border-color: var(--forest); }
