/* Shared by every current and future article. */
.articles-page .articles-hero {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  padding: clamp(24px, 4vw, 40px);
}
.articles-page .articles-hero img { aspect-ratio: 16 / 9; max-height: 260px; object-fit: contain; }
.articles-page .blog-featured h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.3; max-width: 40ch; }
.articles-page .blog-featured p:not(.eyebrow) { line-height: 1.75; max-width: 68ch; }
.articles-page .articles-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
/* The frame is consistent; the artwork keeps its original proportions. */
.articles-page .article-card { border-radius: 16px; }
.articles-page .article-card-media {
  aspect-ratio: 8 / 5;
  background: linear-gradient(145deg, var(--surface-soft), var(--surface));
  border-bottom: 1px solid var(--line);
  display: grid;
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: clamp(12px, 2vw, 22px);
  place-items: center;
}
.articles-page .article-card-media img {
  aspect-ratio: auto;
  background: transparent;
  border-radius: 7px;
  display: block;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.12));
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  width: 100%;
}
.articles-page .article-card h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.35; overflow-wrap: anywhere; }
.articles-page .article-card h3 a { color: var(--ink); text-decoration: none; }
.articles-page .article-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.articles-page .article-card p:not(.blog-card-meta) { font-size: 1rem; line-height: 1.75; }
.articles-page .article-card .article-card-reading-time { color: var(--accent-dark); font-size: 0.85rem; font-weight: 650; margin-bottom: 12px; }
.articles-page .article-card .text-link { padding-top: 16px; }
.articles-page .article-detail-page { background: transparent; border: 0; padding: 0; max-width: 1100px; }
.articles-page .article-detail-page .detail-hero-grid { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; gap: clamp(24px, 4vw, 40px); padding: clamp(22px, 3vw, 36px); }
.articles-page .article-hero-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, var(--surface-soft), var(--surface));
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: clamp(12px, 2vw, 22px);
  place-items: center;
}
.articles-page .article-detail-page .detail-hero-grid .hero-small {
  aspect-ratio: auto;
  background: transparent;
  border-radius: 8px;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.12));
  height: 100%;
  margin: 0;
  max-height: none;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  width: 100%;
}
.articles-page .article-detail-page .detail-hero-copy h1 { font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.2; max-width: 23ch; }
.articles-page .article-detail-page .detail-hero-copy > p:not(.eyebrow):not(.meta) { font-size: 1.075rem; line-height: 1.8; }
.articles-page .article-reading-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5em; font-size: 0.9rem; }
.articles-page .article-reading-layout { align-items: start; display: grid; gap: 32px; margin: 40px auto; max-width: 1040px; }
.articles-page .article-reading-layout.has-contents { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); }
.articles-page .article-contents { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; min-width: 0; padding: 20px; position: sticky; top: 110px; }
.articles-page .article-contents summary { color: var(--ink); cursor: pointer; font-size: 1rem; font-weight: 750; line-height: 1.5; }
.articles-page .article-contents ol { list-style: none; margin: 18px 0 0; padding: 0; }
.articles-page .article-contents li + li { margin-top: 14px; }
.articles-page .article-contents a { color: var(--muted); display: block; font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; text-decoration: none; }
.articles-page .article-contents a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.articles-page .article-contents .article-contents-subsection { padding-left: 12px; }
.articles-page .article-body { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; justify-self: center; min-width: 0; padding: clamp(24px, 4vw, 46px); width: min(100%, 760px); }
.articles-page .article-body > * { max-width: 64ch; margin-left: auto; margin-right: auto; }
.articles-page .article-body p,
.articles-page .article-body li { color: var(--ink); font-size: clamp(1.075rem, 1.5vw, 1.15rem); line-height: 1.85; overflow-wrap: anywhere; }
.articles-page .article-body p { margin-bottom: 1.4em; }
.articles-page .article-body h2 { color: var(--ink); font-size: clamp(1.5rem, 2.5vw, 1.9rem); letter-spacing: -0.025em; line-height: 1.35; margin-bottom: 0.8em; margin-top: 2em; text-wrap: balance; }
.articles-page .article-body h3 { color: var(--ink); font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.4; margin-bottom: 0.75em; margin-top: 1.75em; }
.articles-page .article-body > :first-child { margin-top: 0; }
.articles-page .article-body > :last-child { margin-bottom: 0; }
.articles-page .article-body :is(ul, ol) { margin-block: 1.4em; padding-left: 1.5em; }
.articles-page .article-body li + li { margin-top: 0.65em; }
.articles-page .article-body li::marker { color: var(--accent-dark); font-weight: 650; }
.articles-page .article-body blockquote { background: var(--surface-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; margin-block: 1.6em; padding: 20px 24px; }
.articles-page .article-body blockquote p:last-child { margin-bottom: 0; }
.articles-page .article-recipe-panels { margin-block: 36px; }
.articles-page .article-recipe-list li { color: var(--ink); font-size: 1.075rem; line-height: 1.8; }
.articles-page .article-recipe-list li + li { margin-top: 0.8em; }
.articles-page .article-pdf-panel { margin-block: 40px; }
@media (max-width: 900px) {
  .articles-page .article-reading-layout.has-contents { grid-template-columns: minmax(0, 1fr); }
  .articles-page .article-contents { position: static; }
  .articles-page .article-contents ol { display: grid; gap: 12px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .articles-page .article-contents li + li { margin-top: 0; }
}
@media (max-width: 700px) {
  .articles-page .articles-hero { grid-template-columns: minmax(0, 1fr); }
  .articles-page .articles-hero img { display: none; }
  .articles-page .articles-card-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .articles-page .article-card-media { aspect-ratio: 4 / 3; }
  .articles-page .article-detail-page .detail-hero-grid { gap: 24px; grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .articles-page .article-detail-page .detail-hero-copy h1 { font-size: clamp(1.8rem, 7.5vw, 2.3rem); }
  .articles-page .article-reading-layout { gap: 20px; margin-block: 28px; }
  .articles-page .article-contents ol { grid-template-columns: minmax(0, 1fr); }
  .articles-page .article-body { padding: 24px 20px; }
  .articles-page .article-body blockquote { padding: 16px 18px; }
}

/* PDF cards sit in the reading flow wherever the author inserts a marker. */
.article-body > .article-pdf-card { margin: 2em 0; max-width: 100%; }
.article-body .article-pdf-card-main { grid-template-columns: 80px minmax(0, 1fr); gap: 18px; padding: 20px; }
.article-body .article-pdf-card h3 { font-size: 1.3rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.article-body .article-pdf-card p { font-size: .88rem; line-height: 1.6; margin: 0; }
.article-body .article-pdf-actions .btn { font-size: .85rem; padding: 10px 14px; }
.article-body .article-pdf-fallback { padding: 14px 20px; }
@media (max-width: 540px) {
  .article-body .article-pdf-card-main { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .article-body .article-pdf-thumbnail, .article-body .article-pdf-thumbnail-placeholder { width: 66px; }
  .article-body .article-pdf-frame { min-height: 350px; }
}
.articles-page .article-pdf-thumbnail { object-fit: contain; object-position: center; background: var(--surface-soft); }

/* Find articles without a long scroll; filters also work without JavaScript. */
.article-browse-tools { align-items: end; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 12px; padding: clamp(18px, 3vw, 26px); }
.article-browse-tools label { color: var(--ink); display: grid; flex: 1 1 200px; font-weight: 650; gap: 8px; }
.article-browse-tools input[type="search"], .article-browse-tools select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; min-height: 46px; padding: 10px 12px; width: 100%; }
.article-browse-tools .article-pdf-filter { align-items: center; align-self: center; display: flex; flex: 0 1 auto; font-size: .9rem; }
.article-pdf-filter input { height: 18px; width: 18px; accent-color: var(--accent); }
.article-result-count { color: var(--muted); font-size: .95rem; margin: 12px 0 24px; }
.articles-page .article-card .article-download-badge { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; display: inline-block; font-size: .8rem; font-weight: 700; line-height: 1.4; margin: 0 0 12px; padding: 5px 10px; }
.article-reader-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.article-reader-actions [hidden] { display: none; }
.article-related { border-top: 1px solid var(--line); margin: 42px 0; padding-top: 30px; }
.article-related-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-related-link { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 14px; padding: 22px; text-decoration: none; }
.article-related-link h3 { font-size: 1.2rem; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.article-related-link > span:last-child { color: var(--accent-dark); font-size: .9rem; font-weight: 700; margin-top: auto; }
.article-related-link:hover { border-color: var(--accent); }
.article-browse-tools :is(input, select, button, a):focus-visible, .article-related-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (max-width: 700px) {
  .article-related-grid { grid-template-columns: minmax(0, 1fr); }
  .article-browse-tools { align-items: stretch; flex-direction: column; }
  .article-browse-tools label { flex-basis: auto; }
  .article-browse-tools .article-pdf-filter { align-self: start; }
}
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .skip-link, .article-reader-actions, .article-contents, .article-hero-media, .article-related, .home-cta, .newsletter-promo, .article-pdf-viewer, .theme-toggle, .back-to-top { display: none !important; }
  .articles-page, .articles-page .article-detail-page, .articles-page .article-detail-page .detail-hero-grid, .articles-page .article-reading-layout, .articles-page .article-body { background: #fff !important; border: 0; border-radius: 0; box-shadow: none; color: #000 !important; display: block; margin: 0; max-width: none; padding: 0; width: 100%; }
  .articles-page .article-detail-page .detail-hero-copy h1 { font-size: 24pt; max-width: none; }
  .articles-page .article-body > * { max-width: none; }
  .articles-page .article-body p, .articles-page .article-body li { color: #000; font-size: 11pt; line-height: 1.6; }
  .articles-page h2, .articles-page h3 { break-after: avoid; color: #000; }
  .article-pdf-card, .detail-panel { break-inside: avoid; }
  .article-pdf-actions a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
}
@media print {
  .articles-page .article-detail-page, .articles-page .article-detail-page * { background: transparent !important; box-shadow: none !important; color: #000 !important; }
}

.articles-page .article-pdf-inline-link a { font-weight: 650; text-decoration: underline; text-underline-offset: 0.18em; overflow-wrap: anywhere; }

/* Compact PDF downloads, with a full-size document when the reader expands it. */
.articles-page .article-pdf-panel { border-radius: 16px; margin: 28px auto; max-width: 760px; padding: 20px; }
.articles-page .article-pdf-panel h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; margin: 4px 0 6px; }
.articles-page .article-pdf-intro > p:not(.eyebrow) { font-size: .9rem; line-height: 1.6; }
.articles-page .article-pdf-panel .eyebrow { font-size: .7rem; }
.articles-page .article-pdf-resources { gap: 14px; margin-top: 16px; }
.articles-page .article-pdf-panel .article-pdf-card { border-radius: 12px; box-shadow: none; }
.articles-page .article-pdf-panel .article-pdf-card-main { gap: 16px; grid-template-columns: 64px minmax(0, 1fr); padding: 16px; }
.articles-page .article-pdf-panel :is(.article-pdf-thumbnail, .article-pdf-thumbnail-placeholder) { border-radius: 7px; height: 84px; width: 64px; }
.articles-page .article-pdf-panel .article-pdf-thumbnail-placeholder span { border-width: 1px; border-radius: 5px; font-size: .7rem; padding: 6px; }
.articles-page .article-pdf-panel .article-pdf-card-copy h3 { font-size: 1.05rem; line-height: 1.4; margin: 2px 0 4px; overflow-wrap: anywhere; }
.articles-page .article-pdf-panel .article-pdf-actions { gap: 8px; margin-top: 10px; }
.articles-page .article-pdf-panel .article-pdf-actions .btn { font-size: .85rem; min-height: 42px; padding: 10px 14px; }
.articles-page .article-pdf-panel .article-pdf-viewer > summary { font-size: .9rem; min-height: 44px; padding: 10px 16px; }
@media (max-width: 480px) {
  .articles-page .article-pdf-panel { padding: 16px; }
  .articles-page .article-pdf-panel .article-pdf-card-main { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .articles-page .article-pdf-panel :is(.article-pdf-thumbnail, .article-pdf-thumbnail-placeholder) { height: 64px; width: 48px; }
}
