/* ============================================================
   FitMyRecipe — Journal (Kitchen Science)
   Shared by: home preview section, journal index, article page.
   Loaded after landing.css.
   ============================================================ */

/* per-article accent — set on a wrapping element via .ac-* */
.ac-leaf   { --ac:var(--leaf-deep); --ac-soft:color-mix(in srgb,var(--leaf) 15%,#fff); }
.ac-carrot { --ac:var(--carrot);    --ac-soft:color-mix(in srgb,var(--carrot) 15%,#fff); }
.ac-citrus { --ac:var(--gold-deep); --ac-soft:color-mix(in srgb,var(--citrus) 17%,#fff); }
.ac-beet   { --ac:var(--beet);      --ac-soft:color-mix(in srgb,var(--beet) 13%,#fff); }
.ac-tomato { --ac:var(--tomato);    --ac-soft:color-mix(in srgb,var(--tomato) 13%,#fff); }

.cat-pill{
  display:inline-flex; align-items:center; gap:7px; align-self:flex-start;
  font-family:var(--ui); font-weight:600; font-size:12px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ac,var(--gold-deep)); background:var(--ac-soft,var(--surface-tint));
  border:1px solid color-mix(in srgb,var(--ac,var(--gold-deep)) 24%,transparent);
  padding:5px 12px; border-radius:var(--r-pill);
}
.cat-pill .d{ width:5px; height:5px; border-radius:50%; background:currentColor; }

/* ============================================================
   HOME — Journal preview section
   ============================================================ */
.journal{ background:var(--bg-warm); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.journal .head-row{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.journal .link-more{ display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:15px; color:var(--burgundy); padding-bottom:6px; }
.journal .link-more svg{ transition:transform var(--dur-fast) var(--ease); }
.journal .link-more:hover svg{ transform:translateX(4px); }

.jr-grid{ display:grid; grid-template-columns:1.25fr 1fr; gap:26px; margin-top:54px; }
.jr-list{ display:flex; flex-direction:column; gap:18px; }

/* featured (large) card */
.jr-feature{
  position:relative; display:flex; flex-direction:column; overflow:hidden;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-2xl);
  box-shadow:var(--sh-card); text-decoration:none; color:inherit;
  transition:transform var(--dur) var(--ease), box-shadow var(--dur);
}
.jr-feature:hover{ transform:translateY(-6px); box-shadow:var(--sh-lift); }
.jr-feature .ph{ position:relative; aspect-ratio:16/10; overflow:hidden; }
.jr-feature .ph img{ width:100%; height:100%; object-fit:cover; transition:transform calc(900ms*var(--am)) var(--ease); }
.jr-feature:hover .ph img{ transform:scale(1.05); }
.jr-feature .ph::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 55%, rgba(14,42,35,.5)); }
.jr-feature .body{ padding:26px 28px 28px; display:flex; flex-direction:column; gap:14px; }
.jr-feature h3{ font-family:var(--display); font-weight:700; font-size:30px; line-height:1.12; letter-spacing:-.015em; color:var(--forest); margin:0; }
.jr-feature p{ font-size:16px; color:var(--fg-2); margin:0; }
.jr-meta{ display:flex; align-items:center; gap:14px; font-size:13px; color:var(--fg-3); }
.jr-meta .dot{ width:3px; height:3px; border-radius:50%; background:var(--fg-3); }

/* small list card */
.jr-card{
  position:relative; display:grid; grid-template-columns:104px 1fr; gap:18px; align-items:center;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-xl);
  padding:14px; box-shadow:var(--sh-card); text-decoration:none; color:inherit;
  transition:transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast);
}
.jr-card:hover{ transform:translateX(4px); box-shadow:var(--sh-lift); }
.jr-card .ph{ width:104px; height:104px; border-radius:var(--r-md); overflow:hidden; flex:none; }
.jr-card .ph img{ width:100%; height:100%; object-fit:cover; }
.jr-card .body{ display:flex; flex-direction:column; gap:9px; min-width:0; }
.jr-card h4{ font-family:var(--display); font-weight:600; font-size:19px; line-height:1.18; color:var(--forest); margin:0; }
.jr-card .jr-meta{ font-size:12px; }

/* ============================================================
   JOURNAL INDEX page
   ============================================================ */
.jx-hero{ padding:150px 0 30px; text-align:center; }
.jx-hero .overline{ display:block; margin-bottom:16px; }
.jx-hero h1{ font-family:var(--display); font-weight:700; font-size:clamp(42px,5.4vw,72px); line-height:1.03; letter-spacing:-.025em; color:var(--forest); margin:0 auto; max-width:16ch; }
.jx-hero h1 em{ font-style:italic; color:var(--burgundy); }
.jx-hero p{ font-size:20px; color:var(--fg-2); max-width:54ch; margin:22px auto 0; }

.jx-filters{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:40px 0 8px; }
.jx-filter{
  font-family:var(--ui); font-weight:600; font-size:14px; color:var(--fg-2);
  background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--r-pill);
  padding:10px 18px; cursor:pointer; transition:all var(--dur-fast) var(--ease);
}
.jx-filter:hover{ color:var(--forest); border-color:var(--gold-soft); }
.jx-filter.on{ background:var(--pine); color:var(--cream); border-color:var(--pine); box-shadow:0 6px 16px rgba(28,77,58,.24); }

.jx-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; padding:46px 0 110px; }
.jx-card{
  display:flex; flex-direction:column; overflow:hidden; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--r-2xl); box-shadow:var(--sh-card);
  text-decoration:none; color:inherit;
  transition:transform var(--dur) var(--ease), box-shadow var(--dur);
}
.jx-card:hover{ transform:translateY(-7px); box-shadow:var(--sh-lift); }
.jx-card .ph{ aspect-ratio:16/11; overflow:hidden; }
.jx-card .ph img{ width:100%; height:100%; object-fit:cover; transition:transform calc(900ms*var(--am)) var(--ease); }
.jx-card:hover .ph img{ transform:scale(1.05); }
.jx-card .body{ padding:22px 22px 24px; display:flex; flex-direction:column; gap:13px; flex:1; }
.jx-card h3{ font-family:var(--display); font-weight:600; font-size:23px; line-height:1.16; letter-spacing:-.01em; color:var(--forest); margin:0; }
.jx-card p{ font-size:15px; color:var(--fg-2); margin:0; flex:1; }

/* ============================================================
   ARTICLE page
   ============================================================ */
.article{ padding:128px 0 0; }
.art-head{ max-width:760px; margin:0 auto; text-align:center; }
.art-head .cat-pill{ margin:0 auto; }
.art-head h1{ font-family:var(--display); font-weight:700; font-size:clamp(36px,4.8vw,62px); line-height:1.05; letter-spacing:-.02em; color:var(--forest); margin:18px 0 0; }
.art-head .dek{ font-size:21px; line-height:1.5; color:var(--fg-2); margin:22px 0 0; text-wrap:pretty; }
.art-byline{ display:flex; align-items:center; justify-content:center; gap:13px; margin:28px 0 0; font-size:14px; color:var(--fg-3); }
.art-byline img{ width:38px; height:38px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 1.5px var(--gold); }
.art-byline .nm{ color:var(--forest); font-weight:600; }
.art-byline .dot{ width:3px; height:3px; border-radius:50%; background:var(--fg-3); }

.art-hero{ max-width:1080px; margin:46px auto 0; }
.art-hero .frame{ border-radius:var(--r-2xl); overflow:hidden; box-shadow:var(--sh-lift); aspect-ratio:16/9; position:relative; }
.art-hero .frame img{ width:100%; height:100%; object-fit:cover; }
.art-hero .accent-line{ height:5px; width:80px; background:var(--ac,var(--gold)); border-radius:3px; margin:0 auto 0; }

/* body column */
.art-body{ max-width:720px; margin:0 auto; padding:8px 0 40px; }
.art-body > * + *{ margin-top:26px; }
.art-body p{ font-size:19px; line-height:1.72; color:var(--fg); text-wrap:pretty; }
.art-body p:first-of-type::first-letter{
  font-family:var(--display); font-weight:700; float:left; font-size:64px; line-height:.82;
  padding:6px 12px 0 0; color:var(--ac,var(--burgundy));
}
.art-body h2{ font-family:var(--display); font-weight:700; font-size:30px; line-height:1.18; letter-spacing:-.015em; color:var(--forest); margin-top:46px; }
.art-body ul.art-list{ list-style:none; padding:0; margin-top:24px; display:flex; flex-direction:column; gap:14px; }
.art-body ul.art-list li{ position:relative; padding-left:34px; font-size:18px; line-height:1.6; color:var(--fg); }
.art-body ul.art-list li::before{
  content:""; position:absolute; left:0; top:9px; width:16px; height:16px; border-radius:50%;
  background:var(--ac-soft,var(--surface-tint));
  box-shadow:inset 0 0 0 2px var(--ac,var(--leaf-deep));
}

/* pull quote */
.art-quote{ margin:46px 0; padding:6px 0 6px 30px; border-left:4px solid var(--ac,var(--gold)); }
.art-quote p{ font-family:var(--display); font-style:italic; font-weight:500; font-size:27px; line-height:1.32; color:var(--forest); margin:0; text-wrap:balance; }

/* science callout card */
.sci-card{
  margin:40px 0; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-xl); box-shadow:var(--sh-card); overflow:hidden;
}
.sci-card .sci-top{ display:flex; align-items:center; gap:13px; padding:20px 24px; background:var(--ac-soft,var(--surface-tint)); border-bottom:1px solid var(--line); }
.sci-card .sci-ic{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--surface); box-shadow:inset 0 0 0 1px var(--line); color:var(--ac,var(--forest)); flex:none; }
.sci-card .sci-ic svg{ width:22px; height:22px; }
.sci-card .sci-ttl{ font-family:var(--display); font-weight:700; font-size:21px; color:var(--forest); line-height:1.1; }
.sci-card .sci-sub{ font-size:13px; color:var(--fg-3); margin-top:3px; }
.sci-rows{ padding:8px 24px; }
.sci-row{ display:flex; align-items:baseline; justify-content:space-between; gap:18px; padding:13px 0; border-bottom:1px solid var(--line); }
.sci-row:last-child{ border-bottom:none; }
.sci-row .k{ font-size:15px; color:var(--fg-2); }
.sci-row .v{ font-family:var(--display); font-weight:600; font-size:17px; color:var(--forest); text-align:right; }
.sci-note{ padding:16px 24px 20px; font-size:14.5px; line-height:1.55; color:var(--fg-2); background:var(--surface-tint); border-top:1px solid var(--line); }
.sci-note b{ color:var(--forest); }

/* swap card */
.swap-card{
  margin:40px 0; display:grid; grid-template-columns:1fr auto 1fr; align-items:stretch; gap:0;
  border:1px solid var(--line); border-radius:var(--r-xl); overflow:hidden; box-shadow:var(--sh-card);
}
.swap-card .side{ padding:22px 24px; display:flex; flex-direction:column; gap:8px; justify-content:center; }
.swap-card .side .lab{ font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
.swap-card .side .txt{ font-family:var(--display); font-weight:600; font-size:19px; line-height:1.2; color:var(--forest); }
.swap-card .from{ background:var(--surface-tint); } .swap-card .from .lab{ color:var(--fg-3); }
.swap-card .to{ background:var(--ac-soft,#fff); } .swap-card .to .lab{ color:var(--ac,var(--leaf-deep)); }
.swap-card .arrow{ display:grid; place-items:center; padding:0 14px; background:var(--surface); color:var(--ac,var(--burgundy)); }
.swap-card .arrow svg{ width:22px; height:22px; }
.swap-why{ grid-column:1/-1; padding:16px 24px; background:var(--surface); border-top:1px solid var(--line); font-size:15px; line-height:1.55; color:var(--fg-2); }
.swap-why b{ color:var(--forest); }

/* takeaways */
.art-takeaways{ max-width:720px; margin:20px auto 0; background:var(--deep-green); color:var(--cream); border-radius:var(--r-2xl); padding:34px 36px; box-shadow:0 30px 70px rgba(11,33,27,.3); position:relative; overflow:hidden; }
.art-takeaways::after{ content:""; position:absolute; inset:0; background:radial-gradient(60% 80% at 88% 0%, rgba(212,175,55,.2), transparent 60%); pointer-events:none; }
.art-takeaways .overline{ color:var(--gold); position:relative; }
.art-takeaways h3{ font-family:var(--display); font-weight:700; font-size:26px; color:#fff; margin:12px 0 18px; position:relative; }
.art-takeaways ul{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:14px; position:relative; }
.art-takeaways li{ display:flex; gap:13px; align-items:flex-start; font-size:17px; line-height:1.5; }
.art-takeaways li .ck{ width:24px; height:24px; border-radius:50%; background:rgba(212,175,55,.2); display:grid; place-items:center; flex:none; margin-top:1px; }
.art-takeaways li .ck svg{ width:13px; height:13px; color:var(--gold); }

/* author footer + back */
.art-foot{ max-width:720px; margin:54px auto 0; padding:30px 0 0; border-top:1px solid var(--line); display:flex; align-items:center; gap:16px; }
.art-foot img{ width:54px; height:54px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 1.5px var(--gold); }
.art-foot .nm{ font-family:var(--display); font-weight:600; font-size:19px; color:var(--forest); }
.art-foot .rl{ font-size:14px; color:var(--fg-3); }

.art-back{ display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:15px; color:var(--burgundy); margin-top:8px; }
.art-back svg{ transition:transform var(--dur-fast) var(--ease); }
.art-back:hover svg{ transform:translateX(-4px); }

/* related */
.related{ background:var(--bg-warm); border-top:1px solid var(--line); margin-top:90px; }
.related h2{ font-family:var(--display); font-weight:700; font-size:32px; color:var(--forest); margin:0 0 8px; }

/* page-level back link in nav for sub-pages */
.nav .back-home{ font-size:15px; font-weight:500; color:var(--fg-2); display:inline-flex; align-items:center; gap:7px; }
.nav .back-home:hover{ color:var(--forest); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:880px){
  .jr-grid{ grid-template-columns:1fr; }
  .jx-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:680px){
  .jx-grid{ grid-template-columns:1fr; }
  .jr-feature h3{ font-size:25px; }
  .jr-card{ grid-template-columns:84px 1fr; }
  .jr-card .ph{ width:84px; height:84px; }
  .art-body p{ font-size:17px; }
  .art-body p:first-of-type::first-letter{ font-size:52px; }
  .art-quote p{ font-size:22px; }
  .swap-card{ grid-template-columns:1fr; }
  .swap-card .arrow{ padding:10px; transform:rotate(90deg); }
  .article{ padding-top:104px; }
  .jx-hero{ padding-top:118px; }
}
