/* Mercury-inspired editorial listing + article — Just2Pay tokens */
.ed[data-editorial],
.ed[data-editorial-article]{min-height:70vh}
.ed{
  --ed-max:1180px;
  --ed-h1: clamp(2rem, 3.5vw, 3rem);
  --ed-h2: clamp(1.6rem, 2.4vw, 2.125rem);
  --ed-title-featured: clamp(1.35rem, 2vw, 1.75rem);
  --ed-title: clamp(1rem, 1.25vw, 1.1875rem);
  --ed-excerpt: clamp(0.875rem, 1vw, 1rem);
  --ed-meta: clamp(0.75rem, 0.85vw, 0.8125rem);
  --ed-lh-heading: 1.2;
  --ed-lh-body: 1.5;
  background:#fff;
  color:var(--ink);
  font-family:var(--font);
}
.ed .container{max-width:var(--ed-max)}
.ed button,
.ed input{
  font:inherit;
}
html[lang="ar"] .ed{
  --ed-lh-heading: 1.3;
  --ed-lh-body: 1.65;
  font-family:var(--font);
}

.ed-hero{
  padding:28px 0 16px;
  background:var(--j2p-hero-bg);
}
.ed-hero-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:32px;
}
.ed-kicker{display:none}
.ed-hero:not(.ed-hero--article) h1{
  margin:0 0 10px;
  font-size:var(--ed-h1);
  line-height:var(--ed-lh-heading);
  letter-spacing:-.02em;
  font-weight:650;
  color:var(--navy);
  max-width:none;
  overflow-wrap:break-word;
  word-break:normal;
  hyphens:none;
  height:auto;
  min-height:0;
}
.ed-hero h1 em{
  /* Match homepage hero accent (.hero .display span): same family, blue, no italic. */
  font-style:normal;
  font-weight:560;
  color:var(--blue);
}
html[lang="ar"] .ed-hero h1 em{
  font-style:normal;
  font-weight:600;
}
.ed-hero:not(.ed-hero--article) p{
  margin:0;
  max-width:46ch;
  color:var(--slate);
  font-size:var(--text-body-large);
  line-height:var(--ed-lh-body);
}
.ed-shell-fallback{
  padding:72px 0 48px;
}
.ed-shell-fallback h1{
  margin:0;
  font-size:var(--text-h1);
  line-height:var(--lh-h1);
  color:var(--navy);
  letter-spacing:-.04em;
}
.ed-shell-fallback p{
  margin:16px 0 0;
  max-width:46ch;
  color:var(--slate);
  font-size:var(--text-body-large);
  line-height:var(--lh-body-large);
}
.ed-hero-count{
  color:var(--muted);
  font-size:13px;
  font-weight:750;
  white-space:nowrap;
  padding-bottom:8px;
}

.ed-toolbar{
  padding:4px 0 16px;
  position:static;
  background:transparent;
  border-bottom:0;
}
.ed-toolbar-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.ed-topics{display:flex;flex-wrap:wrap;gap:8px}
.ed-topic{
  min-height:38px;padding:0 14px;border-radius:999px;
  border:1px solid var(--line);background:#fff;
  color:var(--navy);font-size:13px;font-weight:750;cursor:pointer;
}
.ed-topic:hover{border-color:var(--blue);color:var(--blue)}
.ed-topic.is-active{background:var(--navy);border-color:var(--navy);color:#fff}
.ed-topic:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.ed-search{
  position:relative;min-width:min(280px,100%);
}
.ed-search input{
  width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;
  padding-block:0;padding-inline-start:40px;padding-inline-end:14px;
  background:#fff;color:var(--ink);
}
.ed-search svg,
.ed-search .ph{
  position:absolute;inset-inline-start:14px;inset-inline-end:auto;top:50%;
  transform:translateY(-50%);display:grid;place-items:center;
  width:16px;height:16px;font-size:16px;line-height:1;
  color:var(--muted-on-light, var(--muted));
  pointer-events:none;
}

.ed-section{padding:16px 0 8px}
.ed-section-head{
  display:flex;align-items:baseline;justify-content:space-between;
  margin-bottom:12px;
}
.ed-section-head h2{
  margin:0;
  font-size:var(--ed-h2);
  line-height:var(--ed-lh-heading);
  letter-spacing:-.02em;
  color:var(--navy);
  font-weight:650;
  height:auto;
  min-height:0;
}
.ed-section-head span{color:var(--muted);font-size:13px;font-weight:700}

.ed-featured{
  display:grid;grid-template-columns:1.15fr .85fr;gap:16px;
}
.ed-featured.is-single{grid-template-columns:1fr}
.ed-card{
  display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--line);border-radius:22px;
  overflow:hidden;color:inherit;cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease;
}
.ed-card:hover{box-shadow:var(--soft-shadow);border-color:rgba(29,78,216,.28)}
.ed-card:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.ed-card-media{
  display:block;
  width:100%;
  flex-shrink:0;
  aspect-ratio:16/10;
  background:var(--surface-soft, var(--surface, #f8fafc));
  overflow:hidden;
}
.ed-card-media img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}
.ed-featured .ed-card:first-child .ed-card-media,
.ed-card.is-featured .ed-card-media{
  aspect-ratio:16/9;
  max-height:min(38vh, 360px);
}
.ed-card-body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:8px;flex:1}
.ed-pill{
  display:inline-flex;width:fit-content;
  color:var(--blue);font-size:var(--ed-meta);font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;
  line-height:1.3;
}
.ed-card h2,.ed-card h3{
  margin:0;
  color:var(--navy);
  letter-spacing:-.015em;
  font-weight:600;
  line-height:var(--ed-lh-heading);
  height:auto;
  min-height:0;
  overflow-wrap:break-word;
  word-break:normal;
  hyphens:none;
}
.ed-featured .ed-card:first-child h2,
.ed-card.is-featured h2{
  font-size:var(--ed-title-featured);
  font-weight:650;
  max-width:none;
}
.ed-card h3{
  font-size:var(--ed-title);
}
.ed-card:not(.is-featured) h3{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.ed-card:not(.is-featured) h3.is-full{
  display:block;
  -webkit-line-clamp:unset;
  overflow:visible;
}
.ed-card p{
  margin:0;
  color:var(--slate);
  font-size:var(--ed-excerpt);
  line-height:var(--ed-lh-body);
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.ed-meta{
  margin-top:auto;
  color:var(--muted);
  font-size:var(--ed-meta);
  font-weight:650;
  line-height:1.4;
  padding-top:8px;
}

.ed-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:16px;
}
.ed-empty{
  text-align:center;padding:64px 20px;color:var(--slate);
}
.ed-empty h3{color:var(--navy);margin:0 0 8px}
.ed-empty button{
  margin-top:16px;min-height:44px;padding:0 16px;border-radius:12px;
  border:1px solid var(--line);background:#fff;cursor:pointer;font-weight:750;
}

.ed-topics-index{padding:28px 0 16px}
.ed-topic-tiles{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;
}
.ed-topic-tile{
  display:flex;flex-direction:column;gap:8px;
  min-height:140px;padding:20px 18px;border-radius:20px;
  border:1px solid var(--line);background:#F7F9FC;color:inherit;cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease;
}
.ed-topic-tile:hover{box-shadow:var(--soft-shadow);background:#fff}
.ed-topic-tile strong{font-size:22px;letter-spacing:-.04em;color:var(--navy)}
.ed-topic-tile span:last-child{margin-top:auto;color:var(--slate);font-size:13px;font-weight:650}
.ed-subscribe{
  margin:8px 0 4px;padding:24px 28px;border-radius:24px;
  background:linear-gradient(180deg,#F7F9FC,#EEF3FA);
  border:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
}
.ed-subscribe h2{margin:0;font-size:var(--ed-h2);line-height:var(--ed-lh-heading);letter-spacing:-.02em;font-weight:650;color:var(--navy)}
.ed-subscribe p{margin:8px 0 0;color:var(--slate);max-width:46ch;font-size:var(--ed-excerpt);line-height:var(--ed-lh-body)}
.ed-cta{
  margin:28px 0 56px;padding:28px 32px;border-radius:24px;
  background:var(--navy);color:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;
}
.ed-cta h2{margin:0;font-size:var(--ed-h2);line-height:var(--ed-lh-heading);letter-spacing:-.02em;font-weight:650}
.ed-cta p{margin:8px 0 0;color:rgba(255,255,255,.68);font-size:var(--ed-excerpt);line-height:var(--ed-lh-body)}
.ed-cta .btn{cursor:pointer}
.ed-cta .btn-gold{background:var(--j2p-cta);color:var(--j2p-cta-text)}

/* Article — reading-first column, not a product split-hero */
.ed-article{padding:12px 0 0;background:var(--surface-white,#fff)}
.ed-hero--article{padding:48px 0 12px}
.ed-article-masthead{
  max-width:720px;
  margin-inline:auto;
}
.ed-article-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:56px;
  align-items:center;
}
.ed-article-hero-grid.is-text-only{
  grid-template-columns:1fr;
  max-width:760px;
}
.ed-hero--article .ed-article-head{padding:0;max-width:none}
.ed-hero--article .ed-back{margin-bottom:18px}
.ed-back{
  display:inline-flex;align-items:center;gap:8px;
  color:var(--blue);font-weight:850;font-size:14px;margin-bottom:28px;cursor:pointer;
}
.ed-back:before{content:none}
.ed-back .ph{font-size:16px}
.ed-article-head{max-width:none}
.ed-article-head h1{
  margin:12px 0 0;
  font-size:clamp(1.875rem, 1.15rem + 2vw, 2.75rem);
  line-height:1.18;letter-spacing:-.03em;color:var(--navy);font-weight:720;
  overflow-wrap:break-word;
  word-break:normal;
}
.ed-article-head .lede{
  margin:16px 0 0;color:var(--slate);font-size:1.125rem;line-height:1.65;max-width:none;
}
main.v3h .ed-hero--article .lede{
  margin:16px 0 0;
  max-width:none;
}
.ed-article-meta-row{
  display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;
  margin-top:20px;
  color:var(--slate);
  font-size:13px;
  font-weight:650;
}
.ed-article-meta-row span{
  display:inline-flex;align-items:center;gap:6px;
}
.ed-article-meta-row .ph{font-size:15px;color:var(--blue)}
.ed-hero--article .hero-actions{display:none}
.ed-hero--article .ed-share{margin-top:18px}
.ed-article-visual{min-width:0;max-width:100%}
.ed-article > .container{max-width:720px}
.ed-article-cover{
  margin:0 0 40px;
  border-radius:20px;
  overflow:hidden;
  background:var(--navy-deep,#06132f);
  border:1px solid var(--line);
  box-shadow:none;
  min-height:0;
  display:flex;align-items:center;justify-content:center;
  padding:0;
}
.ed-article-cover img{
  width:100%;height:auto;max-height:520px;
  object-fit:contain;object-position:center;display:block;
}
.ed-article-cover.is-landscape{
  aspect-ratio:16/9;
  background:var(--surface-soft,#F8FAFC);
}
.ed-article-cover.is-landscape img{
  width:100%;height:100%;max-height:none;
  object-fit:cover;
}
.ed-article-cover.is-portrait{
  max-width:320px;
  margin:36px auto 8px;
  background:#06132f;
}
.ed-article-cover.is-portrait img{
  width:100%;height:auto;max-height:380px;
  object-fit:contain;
}
.ed-article-body{
  max-width:none;
  font-size:1.125rem;
  line-height:1.8;
  color:#334155;
  padding:0;
  box-shadow:none;
}
.ed-article-body h2{
  margin:2.25em 0 0.7em;color:var(--navy);
  font-size:clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  letter-spacing:-.02em;line-height:1.25;
  font-weight:700;
}
.ed-article-body h3{margin:1.6em 0 0.5em;color:var(--navy);font-size:1.2rem;font-weight:700}
main.v3h .ed-article-body h2{
  margin:2.25em 0 0.7em;color:var(--navy);
  font-size:clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing:-.02em;line-height:1.3;
  font-weight:700;
}
main.v3h .ed-article-body h3{
  margin:1.6em 0 0.5em;color:var(--navy);font-size:1.125rem;font-weight:700;line-height:1.35;
}
.ed-article-body p{margin:0 0 1.25em}
.ed-article-body > p:first-of-type{
  font-size:inherit;
  line-height:inherit;
  color:inherit;
}
.ed-article-body ul,.ed-article-body ol{
  list-style:none;margin:0.4em 0 2em;padding:0;
  display:flex;flex-direction:column;gap:18px;
}
.ed-article-body li{
  display:flex;align-items:flex-start;gap:12px;
  margin:0;padding:0;
  background:transparent;border:0;
  border-radius:0;box-shadow:none;
  color:#334155;
  font-size:inherit;line-height:1.65;
}
.ed-point-copy{min-width:0;flex:1}
.ed-point-copy strong{color:var(--navy);font-weight:750}
.ed-point-mark{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;min-width:22px;margin-top:4px;
  border-radius:999px;
  background:var(--blue-soft,#eaf1ff);
  color:var(--blue);
  flex:0 0 auto;
}
.ed-point-mark .ph{font-size:12px}
.ed-article-body li .icon-box{display:none}
.ed-article-body a{color:var(--blue);font-weight:700}
.ed-article-close,
.ed-article-callout{
  margin:2em 0 0.5em;
  padding:4px 0 4px 18px;
  border-radius:0;
  background:transparent;
  border:0;
  border-inline-start:3px solid var(--j2p-accent);
  color:var(--navy);
  font-size:1.125rem;
  line-height:1.7;
  font-weight:600;
}

/* Mercury-style share — page URL always in Facebook / LinkedIn / X / copy */
.ed-share{
  margin-top:22px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ed-share-label{
  font-size:13px;
  font-weight:750;
  color:var(--navy);
  letter-spacing:-.01em;
}
.ed-share--inline{
  margin-top:20px;
  flex-direction:row;
  align-items:center;
  gap:12px;
}
.ed-share--inline .ed-share-label{
  display:block;
  margin:0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
html[lang="ar"] .ed-share--inline .ed-share-label{
  letter-spacing:0;
  text-transform:none;
}
.ed-share-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.ed-share-btn{
  display:inline-grid;
  place-items:center;
  width:40px;height:40px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--navy);
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}
.ed-share-btn:hover{
  background:#F7F9FC;
  border-color:rgba(29,78,216,.28);
  color:var(--blue);
}
.ed-share-btn:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.ed-share-btn.is-copied{
  border-color:var(--blue);
  color:var(--blue);
  background:#EEF4FF;
}

/* Must NOT use <footer> — site chrome styles all footer { navy }. */
.ed-article-foot{
  margin-top:40px;
  padding:28px 0 56px;
  border-top:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:28px;
  max-width:none;
  background:transparent;
  color:var(--ink);
}
.ed-tags{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
.ed-tags-label{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}
.ed-tag{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#F7F9FC;
  color:var(--navy);
  font-size:13px;
  font-weight:700;
}
.ed-tag:hover{border-color:var(--blue);color:var(--blue)}

.ed-related{
  margin:0;
  padding:64px 0 80px;
  background:var(--surface-soft, #F8FAFC);
  color:var(--ink);
}
.ed-related .container{max-width:var(--ed-max)}
.ed-related h2{
  margin:0 0 20px;
  color:var(--navy);
  font-size:var(--ed-h2);
  line-height:var(--ed-lh-heading);
  font-weight:650;
  letter-spacing:-.02em;
}

.ed-missing{
  padding:80px 0;text-align:center;
}

@media(max-width:1040px){
  .ed-featured,.ed-grid,.ed-topic-tiles{grid-template-columns:1fr 1fr}
  .ed-hero-row{display:block}
  .ed-article-hero-grid{grid-template-columns:1fr;gap:36px}
}
@media(max-width:720px){
  .ed-hero:not(.ed-hero--article){padding:20px 0 12px}
  .ed-hero--article{padding:32px 0 8px}
  .ed-featured,.ed-grid,.ed-topic-tiles{grid-template-columns:1fr}
  .ed-toolbar{padding:4px 0 12px}
  .ed-search{min-width:100%}
  .ed-featured .ed-card:first-child .ed-card-media,
  .ed-card.is-featured .ed-card-media{
    aspect-ratio:16/10;
    max-height:280px;
  }
  .ed-article-cover{min-height:0;border-radius:16px}
  .ed-article-cover.is-portrait{max-width:280px}
  .ed-article-cover img{max-height:360px}
  .ed-article-close,.ed-article-callout{padding:2px 0 2px 14px}
  .ed-cta,.ed-subscribe{padding:24px}
  .ed-related{padding:48px 0 64px}
  .ed-article-body{font-size:1.0625rem;line-height:1.75}
}

html[lang="ar"] .ed-article-body{
  line-height:1.9;
}
html[lang="ar"] .ed-hero:not(.ed-hero--article) h1,
html[lang="ar"] .ed-article-head h1,
html[lang="ar"] .ed-article-body h2,
html[lang="ar"] .ed-section-head h2,
html[lang="ar"] .ed-card h2,
html[lang="ar"] .ed-card h3,
html[lang="ar"] .ed-related h2,
html[lang="ar"] .ed-subscribe h2,
html[lang="ar"] .ed-cta h2{
  letter-spacing:0;
  padding-block:0.08em 0.12em;
}
html[lang="ar"] .ed-pill{letter-spacing:0;text-transform:none}

main.v3h .ed[data-editorial] > .ed-hero{
  padding:28px 0 16px;
}
main.v3h .ed[data-editorial] .ed-hero h1{
  font-size:var(--ed-h1);
  line-height:var(--ed-lh-heading);
  font-weight:650;
  margin:0 0 10px;
  letter-spacing:-.02em;
  max-width:none;
  height:auto;
  min-height:0;
}
main.v3h .ed[data-editorial] .ed-section-head h2,
main.v3h .ed[data-editorial-article] .ed-related h2{
  font-size:var(--ed-h2);
  line-height:var(--ed-lh-heading);
  font-weight:650;
}
main.v3h .ed[data-editorial] .ed-card h3,
main.v3h .ed[data-editorial-article] .ed-card h3{
  font-size:var(--ed-title);
  line-height:var(--ed-lh-heading);
  font-weight:600;
}
main.v3h .ed[data-editorial] .ed-featured .ed-card:first-child h2,
main.v3h .ed[data-editorial] .ed-card.is-featured h2{
  font-size:var(--ed-title-featured);
  font-weight:650;
}
main.v3h .ed[data-editorial] .ed-card p,
main.v3h .ed[data-editorial-article] .ed-card p{
  font-size:var(--ed-excerpt);
  line-height:var(--ed-lh-body);
}
@media(max-width:720px){
  main.v3h .ed[data-editorial] > .ed-hero{padding:20px 0 12px}
}
html[lang="ar"] main.v3h .ed[data-editorial] .ed-hero h1,
html[lang="ar"] main.v3h .ed[data-editorial] .ed-section-head h2,
html[lang="ar"] main.v3h .ed-card h2,
html[lang="ar"] main.v3h .ed-card h3{
  letter-spacing:0;
  line-height:var(--ed-lh-heading);
}
