/* =====================================================================
   ETRYUM INSIGHTS — the front page (JournalIndex.astro), the cards
   (JournalCard.astro) and the article (JournalArticle.astro).
   Built on the tokens and shells of styles.css.
   ===================================================================== */

/* ---------------------------------------------------------------------
   MASTHEAD
   --------------------------------------------------------------------- */
.jmast {
  position: relative;
  padding-block: calc(var(--nav-h) + var(--space-xl)) var(--space-xl);
  background:
    radial-gradient(60% 70% at 92% 10%, var(--glow-terracotta), transparent 64%),
    radial-gradient(40% 50% at 8% 100%, var(--glow-beige), transparent 70%),
    linear-gradient(180deg, var(--black) 0%, var(--ink) 100%);
  color: var(--bone);
  overflow: clip;
}
.jmast__eyebrow { color: var(--etryum-beige); margin-bottom: var(--space-sm); }
.jmast__title {
  font-size: clamp(2.6rem, 7.2vw + .2rem, 7.5rem);
  line-height: .95;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 200;
  text-wrap: balance;
}
.jmast__tagline {
  margin-top: var(--space-sm);
  font-size: clamp(1.3rem, 1.6vw + .8rem, 2.2rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  font-weight: 250;
  color: var(--etryum-beige);
  max-width: 34ch;
}
.jmast__foot {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
}
.jmast__foot .body-lg { max-width: 52ch; color: rgba(242, 233, 220, .8); }
.jmast__issue { display: inline-flex; align-items: center; gap: .7rem; color: var(--etryum-beige); }
.jmast__issue span {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--etryum-beige);
  box-shadow: 0 0 0 0 rgba(229, 203, 136, .5);
  animation: jpulse 2.4s var(--ease-soft) infinite;
}
@keyframes jpulse { 70%, 100% { box-shadow: 0 0 0 .6rem rgba(229, 203, 136, 0); } }
@media (prefers-reduced-motion: reduce) { .jmast__issue span { animation: none; } }

/* ---------------------------------------------------------------------
   CARDS
   --------------------------------------------------------------------- */
.jlist { padding-top: var(--space-xl); }
.jcard { display: grid; gap: var(--space-sm); color: var(--ink-on-light); }
.jcard__media { display: block; aspect-ratio: 4 / 5; }
.jcard__media img { object-position: 50% 12%; }
.jcard:hover .jcard__media img { transform: scale(1.03); }
.jcard__cat { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--terracotta-dk); }
.jcard__lang {
  padding: .1rem .55rem;
  border: 1px solid var(--hairline-dark);
  border-radius: 99px;
  color: var(--ink-on-light-d);
  letter-spacing: .16em;
}
.jcard__title {
  margin-top: 0;
  font-size: var(--fs-sub);
  line-height: 1.12;
  letter-spacing: -.022em;
  font-weight: 300;
  text-wrap: balance;
}
.jcard__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-normal) var(--ease-premium); }
.jcard__title a:hover { background-size: 100% 1px; }
.jcard__dek { margin-top: 1rem; color: var(--ink-on-light-d); max-width: 52ch; }
.jcard__meta { margin-top: var(--space-sm); display: flex; align-items: center; gap: .85rem; }
.jcard__avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; object-position: 50% 8%; }
.jcard__meta p { display: grid; font-size: .9rem; line-height: 1.35; }
.jcard__meta strong { font-weight: 500; }
.jcard__meta .jcard__field { color: var(--ink-on-light-d); font-weight: 300; }
.jcard__meta .jcard__when { margin-top: .15rem; color: var(--ink-on-light-d); font-size: var(--fs-micro); letter-spacing: .18em; font-weight: 500; }
.jcard__more { margin-top: var(--space-sm); justify-self: start; color: var(--ink-on-light); }
.jcard__more:hover { color: var(--terracotta-dk); }

.jcard--featured {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--space-lg) clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.jcard--featured .jcard__media { position: relative; overflow: visible; background: none; }
.jcard--featured .jcard__media img { position: relative; z-index: 1; }
.jcard--featured .jcard__media::before {
  content: '';
  position: absolute;
  inset: clamp(1rem, 2.4vw, 2rem) calc(-1 * clamp(1rem, 2.4vw, 2rem))
         calc(-1 * clamp(1rem, 2.4vw, 2rem)) clamp(1rem, 2.4vw, 2rem);
  border: 1px solid rgba(148, 82, 59, .34);
}
.jcard--featured .jcard__title { font-size: clamp(2rem, 3.4vw + .5rem, 3.75rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 250; }
.jcard--featured .jcard__dek { font-size: var(--fs-body-lg); }
@media (max-width: 860px) {
  .jcard--featured { grid-template-columns: minmax(0, 1fr); }
  .jcard--featured .jcard__media { width: min(100% - 2rem, 26rem); }
}

.jlist__label { margin-top: var(--space-2xl); }
.jlist__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: var(--space-lg) var(--space-md); }

/* How we write */
.jprinciples { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid var(--hairline-dark); }
.jprinciples ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.jprinciples li { display: grid; gap: .6rem; align-content: start; }
.jprinciples .micro { color: var(--terracotta-dk); }
.jprinciples h3 { font-size: 1.3rem; font-weight: 400; letter-spacing: -.01em; line-height: 1.25; }
.jprinciples p { color: var(--ink-on-light-d); }
@media (max-width: 760px) { .jprinciples ol { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------------
   ARTICLE — opening
   --------------------------------------------------------------------- */
.jprogress { position: fixed; inset: 0 0 auto 0; z-index: 120; height: 2px; pointer-events: none; }
.jprogress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--etryum-beige), var(--etryum-terracotta));
  transform: scaleX(0); transform-origin: 0 50%;
}

.jhero {
  position: relative;
  padding-block: calc(var(--nav-h) + var(--space-xl)) var(--space-xl);
  background:
    radial-gradient(70% 60% at 88% 18%, var(--glow-terracotta), transparent 62%),
    linear-gradient(180deg, var(--black) 0%, var(--ink) 100%);
  color: var(--bone);
  overflow: clip;
}
.jhero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: var(--space-lg) clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.jhero__crumbs { display: flex; flex-wrap: wrap; gap: .4rem .8rem; color: var(--bone-dim); margin-bottom: var(--space-sm); }
.jhero__crumbs a { color: var(--etryum-beige); }
.jhero__crumbs a:hover { color: var(--bone); }
.jhero__title {
  font-size: clamp(2.4rem, 4.4vw + .5rem, 4.9rem);
  line-height: 1;
  letter-spacing: -.032em;
  font-weight: 250;
  text-wrap: balance;
}
.jhero__dek { margin-top: var(--space-md); max-width: 50ch; font-size: var(--fs-body-lg); line-height: 1.55; color: rgba(242, 233, 220, .8); }
.jhero__meta {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
}
.jhero__avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; object-position: 50% 8%; box-shadow: 0 0 0 1px rgba(229, 203, 136, .5); }
.jhero__meta p { display: grid; line-height: 1.4; }
.jhero__meta strong { font-weight: 500; }
.jhero__meta span { font-size: .85rem; color: var(--bone-dim); }
.jhero__when { margin-left: auto; text-align: right; font-size: .9rem; }
.jhero__figure { position: relative; justify-self: end; width: min(100%, 26rem); margin: 0; }
.jhero__figure .img-mask { aspect-ratio: 4 / 5; z-index: 1; }
.jhero__figure img { object-position: 50% 0; transform: none; }
.jhero__figure::before {
  content: '';
  position: absolute;
  inset: clamp(1rem, 2.4vw, 2rem) calc(-1 * clamp(1rem, 2.4vw, 2rem))
         calc(-1 * clamp(1rem, 2.4vw, 2rem)) clamp(1rem, 2.4vw, 2rem);
  border: 1px solid rgba(229, 203, 136, .34);
}
@media (max-width: 860px) {
  .jhero__inner { grid-template-columns: minmax(0, 1fr); }
  .jhero__figure { justify-self: start; width: min(100% - 2rem, 22rem); }
  .jhero__when { margin-left: 0; text-align: left; }
}

.jhero__quote {
  margin: var(--space-2xl) auto 0;
  max-width: 58rem;
  text-align: center;
  display: grid; justify-items: center; gap: var(--space-sm);
}
.jhero__quote svg { width: 6rem; fill: none; stroke: var(--etryum-beige); stroke-width: 2; stroke-linecap: round; }
.jhero__quote blockquote { margin: 0; }
.jhero__quote p {
  font-size: clamp(1.6rem, 2.6vw + .6rem, 3rem);
  line-height: 1.15;
  letter-spacing: -.022em;
  font-weight: 250;
  text-wrap: balance;
}
.jhero__quote figcaption { color: var(--etryum-beige); }

/* ---------------------------------------------------------------------
   ARTICLE — reading
   --------------------------------------------------------------------- */
.jread { padding-top: var(--space-xl); counter-reset: jsec; }
.jbody {
  --jwide: min(76rem, calc(100vw - 2 * var(--gutter)));
  width: min(44rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
  font-size: clamp(1.0625rem, .3vw + 1rem, 1.1875rem);
  line-height: 1.75;
  color: #2A221C;
}
.jbody > * + * { margin-top: 1.25em; }
.jbody strong { font-weight: 500; color: var(--ink-on-light); }
.jbody em { font-style: italic; }
.jbody a { color: var(--terracotta-dk); text-decoration: underline; text-underline-offset: .2em; }

.jbody .j-lede {
  font-size: clamp(1.6rem, 1.8vw + 1rem, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 300;
  color: var(--ink-on-light);
}

.jbody h2 {
  counter-increment: jsec;
  margin-top: 2.6em;
  padding-top: 1.1em;
  border-top: 1px solid var(--hairline-dark);
  font-size: clamp(1.75rem, 1.8vw + 1.1rem, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-weight: 300;
  color: var(--ink-on-light);
  text-wrap: balance;
}
.jbody h2::before {
  content: counter(jsec, decimal-leading-zero);
  display: block;
  margin-bottom: .9rem;
  font-size: var(--fs-micro);
  letter-spacing: .24em;
  font-weight: 500;
  color: var(--terracotta-dk);
}
.jbody h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 500; letter-spacing: -.005em; color: var(--ink-on-light); }

/* Pull quote */
.jbody .j-pull {
  margin: 2em 0;
  padding: .2em 0 .2em 1.5rem;
  border-left: 2px solid var(--etryum-terracotta);
}
.jbody .j-pull p {
  font-size: clamp(1.4rem, 1.4vw + 1rem, 2rem);
  line-height: 1.22;
  letter-spacing: -.018em;
  font-weight: 300;
  color: var(--terracotta-dk);
  text-wrap: balance;
}

/* Wide modules step out of the reading column */
.jbody .j-ideas,
.jbody .j-nots,
.jbody .j-steps {
  width: var(--jwide);
  position: relative;
  left: 50%;
  translate: -50% 0;
  margin-top: 2em;
  margin-bottom: 1em;
}

.j-ideas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hairline-dark); border: 1px solid var(--hairline-dark); }
.j-idea { padding: 1.8rem 1.5rem 2rem; background: rgba(252, 249, 241, .72); display: grid; gap: .8rem; align-content: start; font-size: 1rem; line-height: 1.6; }
.j-idea svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: var(--etryum-terracotta); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .4rem; }
.j-idea p { color: var(--ink-on-light-d); }

.j-nots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.j-not { padding: 1.6rem 1.5rem; border-top: 2px solid var(--etryum-garnet); background: rgba(64, 32, 32, .045); font-size: 1rem; line-height: 1.6; display: grid; gap: .6rem; align-content: start; }
.j-not h3 { display: flex; gap: .7rem; align-items: baseline; }
.j-not h3::before { content: '✕'; font-size: .8em; color: var(--etryum-terracotta); }
.j-not p { color: var(--ink-on-light-d); }

.j-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 1.25rem; list-style: none; padding: 0; counter-reset: none; }
.j-steps li { position: relative; padding-top: 2.4rem; font-size: .98rem; line-height: 1.6; display: grid; gap: .6rem; align-content: start; }
.j-steps li::before {
  content: '';
  position: absolute; top: .55rem; left: 0; right: -1.25rem;
  height: 1px; background: rgba(148, 82, 59, .4);
}
.j-steps li:last-child::before { right: 0; }
.j-steps li::after {
  content: '';
  position: absolute; top: .25rem; left: 0;
  width: .65rem; height: .65rem; border-radius: 50%;
  background: var(--etryum-terracotta);
  box-shadow: 0 0 0 4px var(--beige-t);
}
.j-steps__n { font-size: var(--fs-micro); letter-spacing: .24em; font-weight: 500; color: var(--terracotta-dk); }
.j-steps h3 { font-size: 1.3rem; font-weight: 400; }
.j-steps p { color: var(--ink-on-light-d); }

/* Case: a dark card on the light page */
.jbody .j-case {
  margin-top: 1.6em;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(176, 111, 82, .28), transparent 64%),
    var(--ink);
  color: rgba(242, 233, 220, .84);
  font-size: 1.02rem;
  line-height: 1.7;
}
.j-case > * + * { margin-top: 1em; }
.j-case__tag { font-size: var(--fs-micro); letter-spacing: .24em; text-transform: uppercase; font-weight: 500; color: var(--etryum-beige); }
.jbody .j-case__name { margin-top: .3em; font-size: clamp(1.6rem, 1.6vw + 1rem, 2.2rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 300; color: var(--bone); }
.j-case em { color: var(--etryum-beige); font-style: normal; }
.j-case__close { padding-top: 1em; border-top: 1px solid var(--hairline); color: var(--bone); font-size: 1.12rem; }
.jbody .j-case strong { color: var(--etryum-beige); font-weight: 500; }

/* Who it is for */
.jbody .j-for { list-style: none; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--hairline-dark); }
.j-for li { position: relative; padding: 1rem 0 1rem 2.4rem; border-bottom: 1px solid var(--hairline-dark); }
.j-for li::before {
  content: '';
  position: absolute; left: 0; top: 1.85rem;
  width: 1.4rem; height: 1px; background: var(--etryum-terracotta);
}

.jbody .j-litany {
  margin: 1.6em 0;
  font-size: clamp(1.35rem, 1.2vw + 1rem, 1.85rem);
  line-height: 1.3;
  letter-spacing: -.016em;
  font-weight: 300;
  color: var(--ink-on-light);
}

.jbody__disclaimer {
  margin-top: 3em !important;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline-dark);
  font-size: .85rem;
  line-height: 1.55;
  color: var(--ink-on-light-d);
}

@media (max-width: 1080px) {
  .j-ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .j-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .j-steps li { padding: 0 0 1.8rem 2.2rem; }
  .j-steps li::before { top: .9rem; bottom: 0; left: .3rem; right: auto; width: 1px; height: auto; }
  .j-steps li:last-child::before { display: none; }
  .j-steps li::after { top: .45rem; }
}
@media (max-width: 760px) {
  .j-ideas, .j-nots { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------------
   ARTICLE — author, more
   --------------------------------------------------------------------- */
.jauthor {
  width: min(52rem, 100% - 2 * var(--gutter));
  margin: var(--space-xl) auto 0;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--hairline-dark);
  background: rgba(252, 249, 241, .6);
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: var(--space-md);
  align-items: start;
}
.jauthor img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 0; }
.jauthor .micro { color: var(--terracotta-dk); }
.jauthor__name { margin-top: .5rem; font-size: 1.6rem; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
.jauthor__role { margin-top: .4rem; font-size: .9rem; color: var(--ink-on-light-d); }
.jauthor__bio { margin-top: 1rem; line-height: 1.65; }
.jauthor__social { display: inline-block; margin-left: 1.5rem; font-size: .9rem; color: var(--ink-on-light-d); text-decoration: underline; text-underline-offset: .2em; }
.jauthor__social:hover { color: var(--terracotta-dk); }
.jauthor .link-arrow { margin-top: 1.2rem; }
.jauthor .link-arrow:hover { color: var(--terracotta-dk); }
@media (max-width: 600px) {
  .jauthor { grid-template-columns: minmax(0, 1fr); }
  .jauthor img { width: 8rem; }
}
.jread__more { margin-top: var(--space-2xl); }

/* Plain Markdown lists inside an article */
.jbody > ul:not([class]), .jbody > ol:not([class]) { padding-left: 1.4rem; display: grid; gap: .7rem; }
.jbody > ul:not([class]) { list-style: none; }
.jbody > ul:not([class]) li { position: relative; }
.jbody > ul:not([class]) li::before {
  content: ''; position: absolute; left: -1.25rem; top: .8em;
  width: .7rem; height: 1px; background: var(--etryum-terracotta);
}
.jbody > ol:not([class]) { list-style: decimal; }

/* Traffic light: three graded cards (go / wait / stop), in brand colours */
.jbody .j-lights {
  width: var(--jwide);
  position: relative;
  left: 50%;
  translate: -50% 0;
  margin-top: 2em;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}
.j-light {
  --light: var(--etryum-beige);
  padding: 1.6rem 1.5rem 1.8rem;
  border-top: 3px solid var(--light);
  background: rgba(252, 249, 241, .72);
  display: grid; gap: .6rem; align-content: start;
  font-size: 1rem; line-height: 1.6;
}
.j-light--wait { --light: var(--etryum-coral); }
.j-light--stop { --light: var(--etryum-garnet); background: rgba(64, 32, 32, .06); }
.j-light__tag {
  display: flex; align-items: center; gap: .6rem;
  font-size: var(--fs-micro); letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-on-light-d);
}
.j-light__tag::before { content: ''; width: .7rem; height: .7rem; border-radius: 50%; background: var(--light); }
.j-light h3 { font-size: 1.25rem; font-weight: 400; }
.j-light p:not(.j-light__tag) { color: var(--ink-on-light-d); }
@media (max-width: 860px) { .jbody .j-lights { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------------
   FRONT PAGE — ask the specialists, and who writes
   --------------------------------------------------------------------- */
.jask {
  margin-top: var(--space-2xl);
  padding: clamp(1.6rem, 3.5vw, 3rem);
  border: 1px solid var(--hairline-dark);
  background: rgba(252, 249, 241, .66);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--space-md) var(--space-lg);
  align-items: center;
}
.jask__label { color: var(--terracotta-dk); }
.jask__title {
  margin-top: .8rem;
  font-size: clamp(1.7rem, 2.4vw + .6rem, 2.8rem);
  line-height: 1.05;
  letter-spacing: -.028em;
  font-weight: 250;
  text-wrap: balance;
}
.jask__copy { margin-top: 1rem; color: var(--ink-on-light-d); max-width: 50ch; }
.jask__action { display: grid; gap: .9rem; justify-items: start; }
.jask__note { font-size: .82rem; line-height: 1.5; color: var(--ink-on-light-d); max-width: 38ch; }
@media (max-width: 860px) { .jask { grid-template-columns: minmax(0, 1fr); } }

.jauthors__head { margin-bottom: var(--space-xl); }
.jauthors__head .body-lg { margin-top: var(--space-md); max-width: 54ch; }
.team__grid--compact { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--space-md) clamp(.75rem, 1.2vw, 1.25rem); }
.team__grid--compact .member__photo { margin-bottom: .9rem; }
.team__grid--compact .member__photo img { object-position: 50% 12%; }
.team__grid--compact .member__idx { display: none; }
.team__grid--compact .member__cue { left: .5rem; bottom: .5rem; padding: .45rem .6rem; }
.team__grid--compact .member__name { font-size: clamp(1rem, 1vw + .4rem, 1.2rem); }
.team__grid--compact .member__role { font-size: .62rem; letter-spacing: .14em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.team__grid--compact .member__toggle { margin-top: .6rem; }
@media (max-width: 1180px) { .team__grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .team__grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.jauthors__principles {
  margin-top: var(--space-xl);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: .6rem 2rem;
  font-size: var(--fs-micro); letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: var(--bone-dim);
}
.jauthors__principles li { display: inline-flex; align-items: center; gap: .7rem; }
.jauthors__principles li::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: var(--etryum-beige); }
