/* The stories section (articles.php, articles-category.php, article.php and their partials): the index with its
   hero and a grid of four, and a story with its title on the photo, the words down the left and the store and the
   rest of the section in the sidebar. Needs the tokens in baker-feed.css; shares .article-prose and .article-more
   with baker-articles.css. Side-by-side blocks line up top (cap height) and bottom. */

/* ---------------------------------------------------------------- the index hero (and a topic's) */
.stories-hero{position:relative;color:var(--cream);background:radial-gradient(ellipse at 72% 28%,#2b4d3f,var(--green) 62%);padding-block:clamp(44px,5.4vw,84px) clamp(48px,5.6vw,88px)}
.stories-hero-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:clamp(36px,6vw,96px);align-items:stretch}
.stories-hero:not(.stories-hero--photo) .stories-hero-grid{grid-template-columns:1fr}
.stories-hero-copy{display:flex;flex-direction:column;min-width:0}
.stories-hero .eyebrow{display:flex;align-items:center;gap:12px;color:var(--gold);margin-bottom:26px}
.stories-hero .eyebrow span{width:25px;height:1px;background:var(--gold)}
.stories-hero .eyebrow a{color:inherit;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}
.stories-hero .eyebrow a:hover{text-decoration-color:currentColor}
.stories-hero h1{font-size:clamp(42px,5vw,78px);line-height:1.04;letter-spacing:-2.6px;color:var(--cream)}
.stories-hero-intro{font-size:clamp(17px,1.35vw,20px);line-height:1.75;color:#d7dfcf;margin-top:26px}
.stories-hero-count{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:auto;padding-top:30px;font:italic 17px/1.4 var(--serif);color:var(--cream)}
.stories-hero-count .dot{color:#aebda2}
.stories-hero-count a{display:inline-flex;align-items:center;gap:6px;font:700 12.5px var(--sans);color:var(--gold);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}
.stories-hero-count a:hover{text-decoration-color:currentColor}
.stories-hero-count svg{width:15px;height:15px}
/* A topic's hero is tighter: no photo, the count and the way back right under the title. */
.stories-hero--topic{padding-block:clamp(34px,4vw,60px) clamp(36px,4.2vw,64px)}
.stories-hero--topic h1{font-size:clamp(38px,4.4vw,66px)}
.stories-hero--topic .stories-hero-intro{margin-top:18px;max-width:none}
.stories-hero--topic .stories-hero-count{margin-top:0;padding-top:20px}
.stories-hero-photo{margin:0;justify-self:end;width:100%;max-width:560px}
.stories-hero-photo img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:3/2;border-radius:4px 30px 4px 30px;box-shadow:0 24px 50px #0000004d}

/* ---------------------------------------------------------------- the grid: four across, then three, two, one */
.stories{padding-block:clamp(48px,5.6vw,84px);background:var(--cream)}
.stories--related{background:#e2e7d5;border-block:1px solid #cbd3ba}
.stories-head{margin-bottom:clamp(26px,3vw,40px)}
.stories-head h2{font-size:clamp(32px,3.4vw,50px);line-height:1.1;letter-spacing:-1.6px;margin-top:-.13em}
.stories-head h2 small{display:inline-block;margin-left:12px;vertical-align:.25em;font:700 12.5px var(--sans);letter-spacing:.2px;color:var(--muted)}
.stories-feed svg{width:15px;height:15px}
.stories-topics{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
.stories-topics a{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 14px;border:1px solid #d5c9ad;border-radius:999px;background:var(--paper);font-size:13px;font-weight:700;color:var(--green);transition:background .2s,border-color .2s,color .2s}
.stories-topics a span{font-weight:400;color:var(--muted)}
.stories-topics a:hover{border-color:var(--green)}
.stories-topics a[aria-current]{background:var(--green);border-color:var(--green);color:#fff8e6}
.stories-topics a[aria-current] span{color:#aebda2}
/* On a topic page the hero holds the title, so the head is the chips with the feed beside them. */
.stories--topic{padding-top:clamp(34px,3.8vw,56px)}
.stories--topic .section-title-row{justify-content:flex-end;margin-bottom:-38px;position:relative;z-index:1}
.stories--topic .stories-topics{margin-top:0;padding-right:110px}
.story-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(20px,2.2vw,30px);align-items:stretch}
/* Fewer stories, fewer columns: three, two, and one story as a wide card with its photo beside the words. */
@media(min-width:901px){.story-grid[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}.story-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
.story-grid[data-count="1"]{grid-template-columns:1fr}
.story-grid[data-count="1"] .story-card{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,4fr);align-items:stretch}
.story-grid[data-count="1"] .story-card-photo{aspect-ratio:auto;min-height:340px}
.story-grid[data-count="1"] .story-card-body{padding:clamp(26px,3vw,44px) clamp(26px,3.2vw,48px);justify-content:center}
.story-grid[data-count="1"] .story-card h3{font-size:clamp(26px,2.4vw,36px);line-height:1.18;letter-spacing:-1px;margin-top:16px}
.story-grid[data-count="1"] .story-card-excerpt{font-size:16.5px;line-height:1.7;margin-top:14px;-webkit-line-clamp:4}
.story-grid[data-count="1"] .story-card-read{margin-top:24px}
.stories-empty{display:flex;align-items:center;gap:12px;padding:28px 0;font-size:16px;color:var(--muted)}
.stories-empty svg{width:22px;height:22px;color:var(--green)}
.stories .pagination{margin-top:clamp(40px,4.4vw,60px)}

/* A story card: the photo, the topic and date, the title, a line or two, the read link at the foot. */
.story-card{display:flex;flex-direction:column;min-width:0;background:var(--paper);border:1px solid #ddd3bd;border-radius:3px 20px 3px 20px;overflow:hidden;box-shadow:0 6px 0 #eae0cb;transition:box-shadow .3s,transform .3s}
.story-card:hover{box-shadow:0 9px 0 #e2d5b8;transform:translateY(-2px)}
.story-card-photo{display:block;position:relative;aspect-ratio:3/2;overflow:hidden;background:#dfe4d2}
.story-card-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .65s}
.story-card:hover .story-card-photo img{transform:scale(1.035)}
.story-card-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#9aa58f}
.story-card-placeholder svg{width:36px;height:36px}
.story-card-pin{position:absolute;top:12px;left:12px;display:inline-flex;align-items:center;gap:5px;padding:5px 10px;background:var(--gold);color:var(--green);border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.2px;box-shadow:0 2px 6px #0000002e}
.story-card-pin svg{width:12px;height:12px}
.story-card-body{display:flex;flex-direction:column;align-items:flex-start;flex:1;padding:18px 20px 20px}
.story-card-label{font:italic 14px var(--serif);color:var(--red);margin-bottom:6px}
.story-card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:11.5px;color:var(--muted)}
.story-card-meta span:before{content:"·";margin-right:10px;color:#c9bd9d}
.story-chip{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;background:#e2e7d5;color:var(--green);font-size:11px;font-weight:700;letter-spacing:.2px;transition:background .2s,color .2s}
.story-chip:hover{background:var(--green);color:#fff8e6}
.story-card h3{font-size:clamp(19px,1.45vw,22px);line-height:1.3;letter-spacing:-.5px;margin-top:12px}
.story-card h3 a{color:var(--green)}
.story-card h3 a:hover{color:var(--red)}
.story-card-excerpt{font-size:14px;line-height:1.65;color:#55634f;margin-top:10px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.story-card-read{display:inline-flex;align-items:center;gap:7px;margin-top:auto;padding-top:16px;font-size:13px;font-weight:700;color:var(--red);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:text-decoration-color .2s}
.story-card-read svg{width:15px;height:15px;transition:transform .2s}
.story-card:hover .story-card-read{text-decoration-color:currentColor}
.story-card:hover .story-card-read svg{transform:translateX(3px)}

/* ---------------------------------------------------------------- a story */
/* The hero: the photo full-bleed behind a dark gradient, the title on it in cream; without a photo, the green. */
.post-hero{position:relative;color:var(--cream);background:var(--green);padding-block:clamp(56px,7vw,110px) clamp(40px,4.6vw,64px);display:flex;flex-direction:column;justify-content:flex-end;min-height:clamp(380px,46vw,620px)}
.post-hero:not(.post-hero--photo){min-height:0;background:radial-gradient(ellipse at 72% 28%,#2b4d3f,var(--green) 62%)}
.post-hero-photo{position:absolute;inset:0;overflow:hidden}
.post-hero-photo img{width:100%;height:100%;object-fit:cover;object-position:50% 40%}
.post-hero-photo:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#152c2328 0%,#152c2360 45%,#152c23e6 100%)}
.post-hero-copy{position:relative}  /* a .wrap: it keeps the page gutters and max width */
.post-hero-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:13px;color:#d7dfcf;margin-bottom:22px}
.post-hero-meta .story-chip{background:#fff8e6;color:var(--green)}
.post-hero-meta .story-chip--topic{background:var(--gold)}
.post-hero-meta .story-chip:hover{background:var(--cream)}
.post-hero-meta time,.post-hero-meta span{font-weight:700;text-shadow:0 1px 2px #0006}
.post-hero-meta time+span:before{content:"·";margin-right:12px;color:#aebda2}
.post-hero h1{font-size:clamp(36px,4.6vw,70px);line-height:1.06;letter-spacing:-2.2px;color:var(--cream);text-shadow:0 2px 10px #0004;text-wrap:balance}
.post-hero--photo h1{max-width:none}
.post-byline{display:flex;align-items:center;gap:12px;margin-top:22px;font-size:14px;color:#d7dfcf}
.post-byline strong{color:var(--cream)}
.post-byline img,.post-byline-mark{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid #fff8e6;flex:0 0 auto}
.post-byline-mark{display:grid;place-items:center;background:var(--gold);color:var(--green);border-color:var(--gold)}
.post-byline-mark svg{width:20px;height:20px}
.post-byline .dot{color:#aebda2}

/* The body beside the sidebar: the words left, the store and the section right, level at the top. */
.post-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:clamp(36px,6vw,96px);padding-block:clamp(48px,5.6vw,84px) clamp(56px,6.4vw,100px);align-items:start}
.post-main{min-width:0}
.post-prose{font-size:17px;line-height:1.85;color:#455646}
.post-prose>p:first-child{font-size:clamp(19px,1.5vw,22px);line-height:1.7;color:var(--green)}
.post-prose h2{font-size:clamp(25px,2.35vw,34px);color:var(--green);line-height:1.3;letter-spacing:-.9px;margin:40px 0 16px}
.post-prose h3{font-size:clamp(20px,1.7vw,24px);color:var(--green);line-height:1.35;letter-spacing:-.5px;margin:30px 0 12px}
.post-prose p+p,.post-prose ul,.post-prose ol{margin-top:18px}
.post-prose ul,.post-prose ol{padding-left:24px}
.post-prose li+li{margin-top:8px}
.post-prose blockquote{margin:30px 0;padding:4px 0 4px 22px;border-left:3px solid var(--gold);font:italic clamp(20px,1.7vw,24px)/1.45 var(--serif);color:var(--green)}
.post-prose blockquote p:before{content:"\201C"}
.post-prose blockquote p:after{content:"\201D"}
.post-prose figure{margin:32px 0}
.post-prose figure img{display:block;width:100%;height:auto;border-radius:4px 24px 4px 24px;box-shadow:0 8px 0 #eae0cb}
.post-prose figcaption{font-size:12.5px;color:var(--muted);margin-top:12px}
.post-prose hr{border:0;border-top:1px solid #e3d8bf;margin:36px 0}
.post-prose a{color:var(--red);text-decoration:underline;text-underline-offset:3px}
.post-prose a:hover{color:var(--green)}
.post-prose code{font:14px ui-monospace,monospace;background:#f3eddc;padding:2px 6px;border-radius:3px}
.post-tags{list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:36px 0 0;padding:24px 0 0;border-top:1px solid #e3d8bf}
.post-tags li{padding:5px 12px;border:1px solid #d5c9ad;border-radius:999px;background:var(--paper);font-size:12.5px;font-weight:700;color:var(--green)}
.post-tags-label{display:inline-flex;align-items:center;gap:6px;border:0!important;background:none!important;padding-left:0!important;color:var(--muted)!important}
.post-tags-label svg{width:14px;height:14px}
.post-author{display:flex;gap:18px;align-items:flex-start;margin-top:32px;padding:22px 24px;background:var(--paper);border:1px solid #ddd3bd;border-radius:3px 20px 3px 20px}
.post-author img,.post-author .post-byline-mark{width:64px;height:64px;border-radius:50%;object-fit:cover;flex:0 0 auto}
.post-author .post-byline-mark{border:0}
.post-author-name{font:italic 20px/1.3 var(--serif);color:var(--green)}
.post-author p+p{font-size:14.5px;line-height:1.7;color:#55634f;margin-top:6px}
.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:36px;padding-top:28px;border-top:1px solid #e3d8bf}
.post-nav-link{display:flex;flex-direction:column;gap:8px;padding:18px 20px;background:var(--paper);border:1px solid #ddd3bd;border-radius:3px 16px 3px 16px;color:var(--green);transition:border-color .2s,box-shadow .2s}
.post-nav-link:hover{border-color:var(--green);box-shadow:0 5px 0 #eae0cb}
.post-nav-link span{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--red)}
.post-nav-link span svg{width:14px;height:14px}
.post-nav-link strong{font:19px/1.3 var(--serif);letter-spacing:-.4px}
.post-nav-next{text-align:right;align-items:flex-end}

/* The sidebar: the store's green card, then the section's cream cards. Sticky as a whole. */
.story-aside{position:sticky;top:calc(var(--header-h,102px) + 24px);display:grid;gap:18px}
.story-aside .article-sidebar{position:static}
.story-aside-card{background:var(--paper);border:1px solid #ddd3bd;border-radius:3px 20px 3px 20px;padding:22px 24px}
.story-aside-card h2{font-size:21px;letter-spacing:-.5px;margin-bottom:14px}
.story-aside-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.story-aside-list a{display:flex;gap:12px;align-items:center;color:var(--green)}
.story-aside-list img{width:72px;height:54px;object-fit:cover;border-radius:3px 10px 3px 10px;flex:0 0 auto}
.story-aside-list strong{display:block;font:16px/1.35 var(--serif);letter-spacing:-.3px}
.story-aside-list a:hover strong{color:var(--red)}
.story-aside-list time{display:block;font-size:11.5px;color:var(--muted);margin-top:3px}
.story-aside-topics{list-style:none;margin:0;padding:0}
.story-aside-topics li+li{border-top:1px solid #ede4cf}
.story-aside-topics a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0;font-size:14.5px;font-weight:700;color:var(--green)}
.story-aside-topics a span{font-weight:400;color:var(--muted)}
.story-aside-topics a:hover{color:var(--red)}
.story-aside-tags{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.story-aside-tags li{padding:4px 11px;border:1px solid #d5c9ad;border-radius:999px;font-size:12px;font-weight:700;color:var(--green)}
.story-aside-feed{display:inline-flex;align-items:center;gap:8px;padding:0 4px;font-size:13px;font-weight:700;color:var(--green);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}
.story-aside-feed:hover{text-decoration-color:currentColor}
.story-aside-feed svg{width:15px;height:15px;color:var(--red)}

@media(max-width:1250px){.story-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){
  .post-layout{grid-template-columns:1fr}
  .story-aside{position:static}
}
@media(max-width:900px){
  .stories-hero-grid{grid-template-columns:1fr}
  .stories-hero-photo{justify-self:start;max-width:520px}
  .stories-hero-count{padding-top:26px}
  .story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .story-grid[data-count="1"] .story-card{grid-template-columns:1fr}
  .story-grid[data-count="1"] .story-card-photo{aspect-ratio:3/2;min-height:0}
  .stories--topic .section-title-row{margin-bottom:14px}
  .stories--topic .stories-topics{padding-right:0}
}
@media(max-width:600px){
  .story-grid{grid-template-columns:1fr}
  .post-hero{min-height:clamp(320px,90vw,420px)}
  .post-nav{grid-template-columns:1fr}
  .post-nav-next{text-align:left;align-items:flex-start}
  .stories-head .section-title-row{align-items:flex-start}
  .post-author{flex-direction:column}
}
@media(prefers-reduced-motion:reduce){.story-card,.story-card-photo img,.story-card-read svg{transition:none}}
