/* ============================================================================
   Art de Vivre · Journal — editorial layouts for the blog section
   Each post has its own format; shared primitives live here.
   ============================================================================ */

/* ---------- Shared editorial primitives ---------- */
.j-hero {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--c-bg-dark);
  isolation: isolate;
}
.j-hero .bg {
  position: absolute; inset: 0; z-index: -2;
  background-position: center; background-size: cover;
  transform: scale(1.06);
  filter: saturate(1.05) brightness(0.78);
}
.j-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,12,14,0.18) 0%, rgba(11,12,14,0.06) 35%, rgba(11,12,14,0.78) 80%, rgba(11,12,14,0.96) 100%);
}
.j-hero .inner {
  width: var(--container);
  margin: 0 auto;
  padding: calc(var(--header-h) + 6rem) 0 4.5rem;
  color: var(--c-bone);
}
.j-hero .crumb {
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1.5rem;
}
.j-hero .crumb a { opacity: 0.85; }
.j-hero .crumb a:hover { color: var(--c-bone); }
.j-hero .title {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, 6.4rem);
  line-height: 1.02;
  max-width: 22ch;
  letter-spacing: -0.005em;
}
.j-hero .deck {
  margin-top: 1.5rem;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.45rem);
  font-weight: 300;
  max-width: 60ch;
  opacity: 0.92;
}
.j-hero .meta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}
.j-hero .meta-row .dot { opacity: 0.4; }

/* ---------- Article body shell ---------- */
.j-article { background: #ffffff; color: var(--c-ink); }
.j-wrap   { width: var(--container-tight); margin: 0 auto; padding: 5rem 0 6rem; }
.j-wide   { width: var(--container); margin: 0 auto; padding: 4rem 0; }
.j-narrow { width: min(720px, 92vw); margin: 0 auto; padding: 4rem 0; }
.j-prose  { font-family: var(--f-serif); font-size: 1.18rem; line-height: 1.78; font-weight: 400; }
.j-prose p { margin: 0 0 1.25rem; }
.j-prose p + p { margin-top: 0; }
.j-prose h2 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 1.3rem + 1.6vw, 3rem);
  margin: 3.5rem 0 1.25rem;
  line-height: 1.1;
}
.j-prose h3 {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: 1.55rem;
  margin: 2.5rem 0 0.8rem;
  letter-spacing: -0.005em;
}
.j-prose h4 {
  font-family: var(--f-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-rust);
  margin: 2rem 0 0.5rem;
}
.j-prose a { color: var(--c-rust); border-bottom: 1px solid currentColor; }
.j-prose a:hover { color: var(--c-gold); }
.j-prose strong { font-weight: 600; color: var(--c-night); }
.j-prose ul, .j-prose ol { padding-left: 1.4rem; margin: 0 0 1.4rem; }
.j-prose li { margin-bottom: 0.55rem; }
.j-prose blockquote {
  margin: 2.5rem 0;
  padding: 0 0 0 2rem;
  border-left: 3px solid var(--c-gold);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.55;
  color: var(--c-night);
}
.j-prose .dropcap::first-letter {
  font-family: var(--f-display);
  font-size: 4.6rem;
  float: left;
  line-height: 0.95;
  padding: 0.4rem 0.75rem 0 0;
  color: var(--c-rust);
}
.j-prose figure { margin: 2.5rem 0; }
.j-prose figure img { width: 100%; border-radius: 2px; }
.j-prose figcaption {
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(11,12,14,0.55);
  margin-top: 0.6rem;
  text-align: left;
}
.j-prose figcaption .src {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  opacity: 0.7;
  display: block;
  margin-top: 0.2rem;
}

/* ---------- Pull-quote (centered, full-width) ---------- */
.j-pull {
  text-align: center;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--c-night);
  max-width: 28ch;
  margin: 4rem auto;
  position: relative;
}
.j-pull::before, .j-pull::after {
  content: ""; display: block; width: 56px; height: 1px;
  background: var(--c-gold); margin: 1.2rem auto;
}

/* ---------- Sidebar callouts ---------- */
.j-callout {
  border: 1px solid rgba(11,12,14,0.12);
  background: linear-gradient(180deg, rgba(198,154,77,0.06) 0%, rgba(198,154,77,0.02) 100%);
  padding: 1.5rem 1.6rem;
  margin: 2.2rem 0;
  border-left: 3px solid var(--c-gold);
}
.j-callout .h {
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-rust);
  margin-bottom: 0.6rem;
}
.j-callout p { font-size: 1.02rem; line-height: 1.6; margin: 0; }

/* ---------- Sticky TOC (Post 1) ---------- */
.j-toc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
  width: var(--container);
  margin: 0 auto;
  padding: 4rem 0 6rem;
}
.j-toc {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  font-family: var(--f-sans);
  font-size: 1.22rem;
  line-height: 1.45;
  border-top: 1px solid rgba(11,12,14,0.12);
  padding-top: 1.2rem;
}
.j-toc .h {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--c-rust);
  font-weight: 700;
  margin-bottom: 1rem;
}
.j-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.j-toc li { counter-increment: toc; margin-bottom: 0.7rem; }
.j-toc li::before {
  content: counter(toc, decimal-leading-zero) " · ";
  color: var(--c-gold); font-feature-settings: "tnum"; font-weight: 600;
}
.j-toc a { color: rgba(11,12,14,0.82); font-weight: 600; transition: color .2s; }
.j-toc a:hover { color: var(--c-rust); }
.j-toc a.active { color: var(--c-ink); font-weight: 700; }
@media (max-width: 900px) {
  /* minmax(0, 1fr) — not bare 1fr — so the single column can shrink to the
     container instead of being held open by a wide child (a comparison
     matrix / wide figure), which pushed the whole long-read sideways on phones. */
  .j-toc-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .j-toc { position: relative; top: 0; }
}
/* Wide comparison matrices can exceed a phone's width; let them scroll inside
   their own box rather than forcing the entire article to scroll sideways. */
@media (max-width: 640px) {
  .j-matrix { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .j-matrix th, .j-matrix td { white-space: nowrap; }
}

/* ---------- Interactive 90-day checklist (Post 1) ---------- */
.j-checklist {
  margin: 3rem 0;
  border: 1px solid rgba(11,12,14,0.12);
  background: var(--c-bone);
}
.j-checklist header {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid rgba(11,12,14,0.12);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--c-cream);
}
.j-checklist header .h { font-family: var(--f-display); font-size: 1.4rem; }
.j-checklist header .progress {
  font-family: var(--f-sans); font-size: 0.78rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-rust);
}
.j-checklist .row {
  display: grid;
  grid-template-columns: 32px 110px 1fr;
  gap: 1rem;
  padding: 0.95rem 1.6rem;
  border-bottom: 1px solid rgba(11,12,14,0.07);
  cursor: pointer;
  transition: background .2s;
  align-items: baseline;
}
.j-checklist .row:hover { background: rgba(198,154,77,0.06); }
.j-checklist .row:last-child { border-bottom: 0; }
.j-checklist .box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--c-rust);
  display: inline-block;
  position: relative;
  transition: background .2s, border-color .2s;
}
.j-checklist .row.done .box {
  background: var(--c-gold); border-color: var(--c-gold);
}
.j-checklist .row.done .box::after {
  content: "✓"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-ink); font-size: 0.78rem; font-weight: 700;
}
.j-checklist .row.done .txt { text-decoration: line-through; opacity: 0.55; }
.j-checklist .day {
  font-family: var(--f-sans); font-size: 0.7rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--c-rust);
}
.j-checklist .txt { font-family: var(--f-serif); font-size: 1.04rem; line-height: 1.5; }

/* ---------- Comparison tabs (Post 2) ---------- */
.j-tabs-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(11,12,14,0.14);
  border-bottom: 1px solid rgba(11,12,14,0.14);
  margin: 3rem 0;
  font-family: var(--f-sans);
}
.j-tabs-nav button {
  background: none; border: 0; cursor: pointer;
  padding: 1.2rem 1rem;
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 1rem + 1.2vw, 2.2rem);
  color: rgba(11,12,14,0.4);
  letter-spacing: -0.01em;
  transition: color .25s, background .25s;
  position: relative;
  border-right: 1px solid rgba(11,12,14,0.08);
}
.j-tabs-nav button:last-child { border-right: 0; }
.j-tabs-nav button.active {
  color: var(--c-ink);
  background: linear-gradient(180deg, rgba(198,154,77,0.10), rgba(198,154,77,0));
}
.j-tabs-nav button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--c-gold);
}
.j-tab-panel { display: none; }
.j-tab-panel.active { display: block; }

/* ---------- Comparison matrix table (Post 2) ---------- */
.j-matrix {
  width: 100%;
  border-collapse: collapse;
  margin: 3rem 0;
  font-family: var(--f-sans);
  font-size: 0.95rem;
}
.j-matrix th, .j-matrix td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(11,12,14,0.10);
  vertical-align: top;
}
.j-matrix thead th {
  font-family: var(--f-display);
  font-size: 1.3rem;
  border-bottom: 2px solid var(--c-night);
  color: var(--c-night);
}
.j-matrix tbody th {
  font-family: var(--f-sans);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-rust);
  font-weight: 500;
  background: rgba(198,154,77,0.05);
  width: 22%;
}
.j-matrix .check { color: var(--c-gold); font-weight: 700; }
.j-matrix .x     { color: rgba(11,12,14,0.4); }

/* ---------- Currency toggle (Post 3) ---------- */
.j-cx-bar {
  display: flex;
  gap: 0.4rem;
  margin: 2.5rem 0 1.5rem;
  font-family: var(--f-sans);
  font-size: 0.84rem;
}
.j-cx-bar button {
  background: var(--c-bone); border: 1px solid rgba(11,12,14,0.18);
  padding: 0.55rem 1rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: all .2s;
  font-weight: 500;
  color: rgba(11,12,14,0.65);
}
.j-cx-bar button.active {
  background: var(--c-night); color: var(--c-bone); border-color: var(--c-night);
}
.j-cx-bar button:hover:not(.active) {
  background: rgba(198,154,77,0.10);
}
.j-cx-bar .h {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-rust);
  align-self: center;
  margin-right: 0.6rem;
}

/* ---------- Price-trend chart wrapper (Post 3) ---------- */
.j-chart {
  margin: 3rem 0;
  background: var(--c-night);
  color: var(--c-bone);
  padding: 2.4rem 2rem;
  border-radius: 2px;
}
.j-chart h3 {
  font-family: var(--f-display);
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  color: var(--c-bone);
}
.j-chart .sub {
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1.4rem;
}
.j-chart svg { width: 100%; height: auto; }
.j-chart .legend {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  margin-top: 1rem;
  font-family: var(--f-sans); font-size: 0.8rem;
}
.j-chart .legend .swatch {
  display: inline-block; width: 12px; height: 12px;
  margin-right: 0.4rem; vertical-align: middle;
}

/* ---------- Stat grid (Post 3) ---------- */
.j-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  margin: 3rem 0;
  border-top: 1px solid rgba(11,12,14,0.14);
  border-left: 1px solid rgba(11,12,14,0.14);
}
.j-stat-grid > div {
  padding: 1.4rem 1.2rem;
  border-bottom: 1px solid rgba(11,12,14,0.14);
  border-right: 1px solid rgba(11,12,14,0.14);
}
.j-stat-grid .n {
  font-family: var(--f-display);
  font-size: 2.2rem;
  color: var(--c-rust);
  line-height: 1;
}
.j-stat-grid .l {
  font-family: var(--f-sans);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-night);
  margin-top: 0.6rem;
  line-height: 1.45;
}

/* ---------- Photo-essay grids (Post 4) ---------- */
.j-photo-essay { background: var(--c-night); color: var(--c-bone); padding: 5rem 0; }
.j-photo-essay h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 1.4rem + 2vw, 3.6rem);
  margin: 0 0 1rem;
  color: var(--c-bone);
}
.j-photo-essay .lead { color: var(--c-bone); opacity: 0.88; }
.j-photo-row {
  display: grid; gap: 1rem;
  margin: 3rem 0;
}
.j-photo-row.r-2 { grid-template-columns: 1.4fr 1fr; }
.j-photo-row.r-3 { grid-template-columns: 1fr 1.6fr 1fr; }
.j-photo-row img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.j-photo-row .cell {
  position: relative; overflow: hidden;
  background: var(--c-ink-2);
  min-height: 320px;
}
.j-photo-row .cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(0deg, rgba(11,12,14,0.85) 0%, transparent 100%);
  font-family: var(--f-sans);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
@media (max-width: 800px) {
  .j-photo-row.r-2, .j-photo-row.r-3 { grid-template-columns: 1fr; }
}

/* Map (Post 4) */
.j-map {
  width: 100%;
  height: 540px;
  margin: 3rem 0;
  background: var(--c-night);
  border: 1px solid rgba(11,12,14,0.14);
}
.j-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin: -1.5rem 0 3rem;
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(11,12,14,0.7);
}
.j-map-legend span.dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ---------- FAQ accordion (Post 5) ---------- */
.j-faq { margin: 3rem 0; border-top: 1px solid rgba(11,12,14,0.14); }
.j-faq details {
  border-bottom: 1px solid rgba(11,12,14,0.14);
  padding: 1.4rem 0;
}
.j-faq summary {
  cursor: pointer;
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 1rem + 0.8vw, 1.8rem);
  color: var(--c-ink);
  position: relative;
  padding-right: 3rem;
  list-style: none;
  line-height: 1.2;
}
.j-faq summary::-webkit-details-marker { display: none; }
.j-faq summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-sans);
  font-size: 1.8rem;
  color: var(--c-rust);
  font-weight: 300;
  transition: transform .25s;
}
.j-faq details[open] summary::after { content: "−"; }
.j-faq .a {
  margin-top: 1.2rem;
  font-family: var(--f-serif);
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(11,12,14,0.85);
  max-width: 64ch;
}
.j-faq .a p { margin: 0 0 1rem; }
.j-faq .a p:last-child { margin: 0; }
.j-faq .a strong { color: var(--c-night); font-weight: 600; }
.j-faq .a ul { padding-left: 1.4rem; margin: 0.4rem 0 1rem; }
.j-faq .a li { margin-bottom: 0.4rem; }

/* ---------- Closing-cost calculator (Post 5) ---------- */
.j-calc {
  background: var(--c-night);
  color: var(--c-bone);
  padding: 2.8rem 2.2rem;
  margin: 4rem 0;
  border-radius: 2px;
}
.j-calc .h {
  font-family: var(--f-display);
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}
.j-calc .sub {
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1.6rem;
}
.j-calc label {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold-soft);
  margin: 1.2rem 0 0.4rem;
}
.j-calc input[type="range"] {
  width: 100%;
  accent-color: var(--c-gold);
}
.j-calc .val {
  font-family: var(--f-display);
  font-size: 1.4rem;
  color: var(--c-bone);
}
.j-calc .results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(250,246,238,0.18);
  border-left: 1px solid rgba(250,246,238,0.18);
}
.j-calc .results > div {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid rgba(250,246,238,0.18);
  border-right: 1px solid rgba(250,246,238,0.18);
}
.j-calc .results .n {
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--c-gold);
}
.j-calc .results .l {
  font-family: var(--f-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-bone);
  opacity: 0.7;
  margin-top: 0.4rem;
}
.j-calc .results .grand .n { color: var(--c-bone); font-size: 1.8rem; }

/* ---------- Author block + next reads ---------- */
.j-author {
  margin: 4rem 0 0;
  padding: 2.4rem 0;
  border-top: 1px solid rgba(11,12,14,0.18);
  border-bottom: 1px solid rgba(11,12,14,0.18);
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1.4rem;
  font-family: var(--f-sans);
}
.j-author .avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--c-cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 1.6rem;
  color: var(--c-rust);
}
.j-author .name { font-weight: 600; font-size: 0.98rem; color: var(--c-ink); }
.j-author .bio { font-size: 0.88rem; line-height: 1.6; color: rgba(11,12,14,0.7); margin-top: 0.2rem; }
.j-author .bio a { color: var(--c-rust); border-bottom: 1px solid currentColor; }

.j-next {
  background: var(--c-night);
  color: var(--c-bone);
  padding: 5rem 0;
}
.j-next .head {
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1rem;
  text-align: center;
}
.j-next .h {
  text-align: center;
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem);
  margin-bottom: 3rem;
}
.j-next .row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  width: var(--container);
  margin: 0 auto;
}
.j-next .card {
  background: var(--c-ink-2);
  padding: 0;
  overflow: hidden;
  transition: transform .35s var(--ease);
  display: block;
}
.j-next .card:hover { transform: translateY(-4px); }
.j-next .card .img { aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
.j-next .card .body { padding: 1.6rem; }
.j-next .card .label {
  font-family: var(--f-sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.j-next .card .t {
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin-top: 0.6rem;
  line-height: 1.18;
}
@media (max-width: 720px) {
  .j-next .row { grid-template-columns: 1fr; }
}

/* ============================================================================
   Journal index — full-bleed editorial gallery
   ============================================================================ */
/* restyle: typographic masthead — no photo, generous air, magazine-cover poise */
.j-index-hero {
  position: relative;
  padding: calc(var(--header-h) + 4.8rem) 0 4.4rem;
  background: var(--c-ink);
  color: var(--c-bone);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
/* soft top-lit amber glow so the masthead reads as crafted, not a flat slab */
.j-index-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(130% 90% at 50% -12%, rgba(198, 154, 77, 0.14), transparent 55%),
    var(--c-ink);
}
/* hairline gold rule along the bottom, handing off into the controls bar */
.j-index-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 154, 77, 0.45), transparent);
}
.j-index-hero .inner {
  width: var(--container);
  max-width: 820px;
  margin: 0 auto;
}
.j-index-hero .label {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.j-index-hero .label::before,
.j-index-hero .label::after {
  content: ""; width: 40px; height: 1px;
  background: currentColor; opacity: 0.55;
}
.j-index-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.3rem, 1.5rem + 3vw, 3.9rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 1.5rem auto 1.25rem;
  max-width: 20ch;
}
.j-index-hero h1 .italic { font-style: normal; color: var(--c-gold-soft); }
.j-index-hero p {
  font-family: var(--f-sans);
  font-style: normal;
  font-size: clamp(1rem, 0.92rem + 0.3vw, 1.12rem);
  line-height: 1.7;
  max-width: 58ch;
  opacity: 0.8;
  margin: 0 auto;
}

/* ---- Controls: search + category filter ---- */
.jx-controls {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: rgba(11, 12, 14, 0.92);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(250, 246, 238, 0.08);
  transition: top 0.4s var(--ease);
}
.site-header.is-hidden ~ main .jx-controls { top: 0; }
.jx-controls .inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.4rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}
.jx-search {
  position: relative;
  flex: 1 1 240px;
  max-width: 340px;
}
.jx-search svg {
  position: absolute;
  left: 0.95rem; top: 50%;
  transform: translateY(-50%);
  width: 0.95rem; height: 0.95rem;
  color: var(--c-bone);
  opacity: 0.55;
  pointer-events: none;
}
.jx-search input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.55rem;
  font-family: var(--f-sans);
  font-size: 0.9rem;
  color: var(--c-bone);
  background: rgba(250, 246, 238, 0.06);
  border: 1px solid rgba(250, 246, 238, 0.18);
  border-radius: 999px;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.jx-search input::placeholder { color: rgba(250, 246, 238, 0.5); }
.jx-search input:focus {
  outline: none;
  background: rgba(250, 246, 238, 0.1);
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(198, 154, 77, 0.22);
}
.jx-search input::-webkit-search-cancel-button { cursor: pointer; }
.jx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.jx-chip {
  font-family: var(--f-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.48rem 0.95rem;
  color: rgba(250, 246, 238, 0.78);
  background: transparent;
  border: 1px solid rgba(250, 246, 238, 0.22);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.jx-chip:hover {
  color: var(--c-bone);
  border-color: rgba(250, 246, 238, 0.5);
}
.jx-chip.is-active {
  color: var(--c-ink);
  background: var(--c-bone);
  border-color: var(--c-bone);
}

/* ---- Gallery grid ---- */
.jx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  /* restyle: bone field — empty grid cells read as whitespace, not dark voids */
  background: var(--c-bone);
}
.jx-card {
  display: flex;
  flex-direction: column;
  background: var(--c-bone);
  color: var(--c-ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.jx-card:not(.jx-card--feature):hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px -22px rgba(0, 0, 0, 0.65);
  z-index: 2;
}
.jx-card .img-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--c-ink-2, #14161a);
}
.jx-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.jx-card:hover img { transform: scale(1.05); }
.jx-card .body {
  padding: 1.5rem clamp(1.3rem, 2vw, 1.9rem) 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.jx-card .label {
  font-family: var(--f-sans);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-rust);
}
.jx-card .t {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 0.95rem + 0.7vw, 1.55rem);
  line-height: 1.16;
  margin: 0.65rem 0 0;
  color: var(--c-ink);
  transition: color .2s;
}
.jx-card:hover .t { color: var(--c-rust); }
.jx-card .d {
  font-family: var(--f-serif);
  font-size: 0.98rem;
  line-height: 1.56;
  color: rgba(11,12,14,0.74);
  margin: 0.7rem 0 0;
}
.jx-card .read {
  font-family: var(--f-sans);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-rust);
  margin-top: 1.1rem;
  align-self: flex-start;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: letter-spacing .25s var(--ease), color .2s var(--ease);
}
.jx-card:hover .read { letter-spacing: 0.26em; }

/* ---- Featured card (pillar guide) — refined split lead, NOT a second hero ---- */
.jx-card--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: stretch;
  background: var(--c-bg-dark);
  color: var(--c-bone);
}
.jx-card--feature .img-wrap {
  position: relative;
  inset: auto;
  aspect-ratio: auto;
  height: 100%;
  min-height: clamp(300px, 32vw, 440px);
}
/* drop the full-bleed cinematic overlay — image now sits beside the copy */
.jx-card--feature::after { content: none; }
.jx-card--feature .body {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
  max-width: none;
  padding: clamp(2rem, 3.4vw, 3.4rem) clamp(1.8rem, 3.4vw, 3.6rem);
}
.jx-card--feature .label { color: var(--c-gold); }
.jx-card--feature .t {
  color: var(--c-bone);
  /* deliberately kept below the .j-index-hero h1 scale so there is one hero */
  font-size: clamp(1.7rem, 1.25rem + 1.3vw, 2.5rem);
}
.jx-card--feature:hover .t { color: var(--c-gold); }
.jx-card--feature .d {
  color: rgba(250, 246, 238, 0.82);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.16rem);
  max-width: 50ch;
}
.jx-card--feature .read {
  color: var(--c-bone);
  border-bottom-color: var(--c-gold);
}

/* ---- Hidden by filter / search ---- */
.jx-card[hidden] { display: none !important; }

/* ---- Empty state ---- */
.jx-empty {
  width: var(--container);
  margin: 4rem auto 5rem;
  text-align: center;
  font-family: var(--f-serif);
  font-size: 1.2rem;
  color: rgba(11, 16, 24, 0.7);
}
.jx-empty[hidden] { display: none; }
.jx-empty .q { font-style: italic; color: var(--c-ink); }
.jx-empty .q::before { content: "\201c"; }
.jx-empty .q::after  { content: "\201d"; }
.jx-empty button {
  display: inline-block;
  margin-left: 0.4rem;
  font-family: var(--f-sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-rust);
  background: none;
  border: none;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .jx-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .jx-grid { grid-template-columns: 1fr; }
  .jx-card--feature { grid-template-columns: 1fr; }
  .jx-card--feature .img-wrap { min-height: clamp(220px, 52vw, 320px); }
  .jx-controls .inner { padding: 0.9rem 0; }
  .jx-search { max-width: none; }
}

/* ---------- Flowchart (process diagram) ---------- */
.j-flow {
  margin: 3.2rem 0;
  background: var(--c-night);
  color: var(--c-bone);
  padding: 2.6rem 2rem;
  border-radius: 2px;
}
.j-flow .h {
  font-family: var(--f-display);
  font-size: 1.7rem;
  color: var(--c-bone);
  margin-bottom: 0.3rem;
}
.j-flow .sub {
  font-family: var(--f-sans);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 2rem;
}
.j-flow ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: jflow;
}
.j-flow li {
  position: relative;
  counter-increment: jflow;
  padding: 0 0 0 4.2rem;
  min-height: 3.4rem;
}
.j-flow li:not(:last-child) { padding-bottom: 1.9rem; }
.j-flow li::before {
  content: counter(jflow);
  position: absolute;
  left: 0; top: 0;
  width: 2.9rem; height: 2.9rem;
  border: 1px solid var(--c-gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 1.15rem;
  color: var(--c-gold);
  background: var(--c-night);
  z-index: 1;
}
.j-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.45rem; top: 2.9rem; bottom: -0.1rem;
  width: 1px;
  background: linear-gradient(180deg, var(--c-gold) 0%, rgba(198,154,77,0.25) 100%);
}
.j-flow li .step-t {
  font-family: var(--f-sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold-soft);
  display: block;
  margin-bottom: 0.35rem;
  padding-top: 0.25rem;
}
.j-flow li .step-d {
  font-family: var(--f-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--c-bone);
  opacity: 0.92;
}
.j-flow li.branch::before {
  border-style: dashed;
  color: var(--c-rust);
  border-color: var(--c-rust);
}
.j-flow .foot {
  margin-top: 2rem;
  font-family: var(--f-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(250,246,238,0.55);
}

/* ---------- Bar graphic (horizontal comparison) ---------- */
.j-bars {
  margin: 3.2rem 0;
  background: var(--c-bone);
  border: 1px solid rgba(11,12,14,0.14);
  padding: 2.4rem 2rem;
  border-radius: 2px;
}
.j-bars .h {
  font-family: var(--f-display);
  font-size: 1.7rem;
  color: var(--c-night);
  margin-bottom: 0.3rem;
}
.j-bars .sub {
  font-family: var(--f-sans);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-rust);
  margin-bottom: 1.8rem;
}
.j-bars .bar {
  display: grid;
  grid-template-columns: 13rem 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(11,12,14,0.10);
}
.j-bars .bar:first-of-type { border-top: 0; }
.j-bars .bar .lbl {
  font-family: var(--f-sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--c-night);
}
.j-bars .bar .track {
  position: relative;
  background: rgba(11,12,14,0.06);
  height: 1.9rem;
  border-radius: 1px;
}
.j-bars .bar .fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-rust) 100%);
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.7rem;
  color: var(--c-bone);
  font-family: var(--f-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-width: 3rem;
}
.j-bars .bar .fill.muted {
  background: linear-gradient(90deg, rgba(11,12,14,0.55) 0%, rgba(11,12,14,0.8) 100%);
}
.j-bars .foot {
  margin-top: 1.6rem;
  font-family: var(--f-sans);
  font-size: 0.78rem;
  color: rgba(11,12,14,0.55);
}
@media (max-width: 640px) {
  .j-bars .bar { grid-template-columns: 1fr; gap: 0.35rem; }
  .j-bars .bar .lbl { font-size: 0.78rem; }
}

/* 2026-06-10 restyle: bold text inside dark journal panels must stay light —
   .j-prose strong is near-black for the white article body. */
.j-flow strong, .j-chart strong, .j-next strong, .j-calc strong,
.j-photo-essay strong, .j-map strong { color: #fff; }
