/* A little room inside each chapter; a longer pause between chapters. */
@media(max-width:700px){
 body{
  --tdp-phone-section:clamp(2.4rem,11vw,3.35rem);
  --tdp-phone-cards:clamp(.78rem,3.3vw,1.05rem);
  --tdp-rule:rgba(47,74,61,.19);
  /* The mountain line from the theme's existing editorial divider. */
  --tdp-mountain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='580 0 40 22'%3E%3Cpath d='M582 17 593 6 598 10 605 3 618 17' fill='none' stroke='%232F4A3D' stroke-opacity='.62' stroke-width='1.5'/%3E%3C/svg%3E");
  --tdp-pause-image:var(--tdp-mountain) center / 28px 16px no-repeat, linear-gradient(var(--tdp-rule),var(--tdp-rule)) left center / calc(50% - 24px) 1px no-repeat, linear-gradient(var(--tdp-rule),var(--tdp-rule)) right center / calc(50% - 24px) 1px no-repeat;
 }
 /* Use markers only before a genuine change of subject. Never between individual cards. */
 .magazine-home > #journal.tdp-edit-feature::before,
 .magazine-home > .wrap:has(> .topics)::after,
 body #tdp-jr :is(.jr-curated,.jr-latest)::before,
 body #tdp-od :is(#outdoor-topics,#gear)::after,
 body #tdp-cook .cook-index::after,
 .fitness-content-editable > .tdp-fitness-latest-heading::before,
 body.page-id-16 .tdp-story > #free-training-day::before,
 body #tdp-newsletter-page .tdp-n-archive::before,
 .tdp-about-new .about-hero::after,
 .tdp-gift-guide > section::before,
 #upcoming-events.tdp-event-agenda::before{
  content:"";display:block;width:100%;height:18px;background:var(--tdp-pause-image);pointer-events:none;
 }
 .magazine-home > #journal.tdp-edit-feature::before,
 body #tdp-jr :is(.jr-curated,.jr-latest)::before,
 .fitness-content-editable > .tdp-fitness-latest-heading::before,
 body.page-id-16 .tdp-story > #free-training-day::before,
 body #tdp-newsletter-page .tdp-n-archive::before,
 .tdp-gift-guide > section::before,
 #upcoming-events.tdp-event-agenda::before{margin:0 0 1.55rem}
 body #tdp-od :is(#outdoor-topics,#gear)::after,
 body #tdp-cook .cook-index::after,
 .tdp-about-new .about-hero::after{margin:1.75rem 0 0}
 .tdp-about-new .about-hero::after{grid-column:1/-1}

 body #tdp-jr .jr-section,#tdp-od .od-section{margin-top:var(--tdp-phone-section)}
 body #tdp-jr :is(.jr-topics,.jr-curated,.jr-latest) h2{margin-bottom:1rem}
 body #tdp-jr .jr-topic-buttons{gap:var(--tdp-phone-cards);margin-top:.15rem}
 body #tdp-jr .jr-topic-buttons .jr-topic-button .wp-block-button__link{
  border-color:rgba(47,74,61,.17)!important;
  border-radius:5px!important;
 }
 body #tdp-jr :is(.jr-picks,.jr-side) {gap:var(--tdp-phone-cards)}
 body #tdp-jr .jr-latest-query .wp-block-post-template{row-gap:1.4rem}

 body #tdp-od .od-section-heading{margin-bottom:1rem}
 body #tdp-od .od-topics-grid{gap:var(--tdp-phone-cards)}
 body #tdp-od .od-topics-grid>a{border-color:rgba(47,74,61,.17)!important}
 body #tdp-od .od-topics-grid .outdoor-stamp-copy strong{text-decoration:none}
 body #tdp-od .od-topics-grid .outdoor-stamp-copy span{line-height:1.48}
 body #tdp-od :is(#outdoor-topics,#gear)+section{margin-top:1.65rem}
 body #tdp-od .od-articles-query .wp-block-post-template{row-gap:1.3rem}

 body #tdp-cook .cook-index{margin-top:var(--tdp-phone-section)}
 body #tdp-cook .cook-card-grid{gap:var(--tdp-phone-cards)}
 body #tdp-cook .cook-recipe{margin-top:var(--tdp-phone-section)}
 body #tdp-cook .cook-index + .cook-recipe{margin-top:1.65rem;border-top:0;padding-top:0!important}
 body #tdp-cook .cook-recipe-body{row-gap:1.45rem}

 .magazine-home > .wrap:has(> .topics){padding-top:2.1rem!important;padding-bottom:2.7rem!important;margin-bottom:1.45rem}
 .magazine-home > .wrap:has(> .topics)>h2{margin-bottom:1rem}
 .magazine-home > #thru-hike {margin-bottom:2.2rem!important}
 .magazine-home > #journal.tdp-edit-feature{margin-bottom:2.2rem}
 .magazine-home > :is(#gifts,#about,.tdp-home-newsletter){margin-top:1.45rem}
 .magazine-home > .tdp-home-newsletter{margin-bottom:2.1rem}
 .fitness-content-editable > :is(.tdp-offer,.tdp-options,.tdp-fitness-latest-heading,.tdp-journal-signup){margin-top:var(--tdp-phone-section)}
 .fitness-content-editable > .tdp-fitness-latest-heading{margin-bottom:1rem}
 body.page-id-16 .tdp-story > :is(.tdp-band,.tdp-offer){margin-top:1.75rem}
 body.page-id-16 .tdp-story > #free-training-day{margin-top:var(--tdp-phone-section)}
 body #tdp-newsletter-page .tdp-n-archive{margin-top:var(--tdp-phone-section)}
 body #tdp-newsletter-page .tdp-n-archive-head{border-top:0;padding-top:0}
 .tdp-about-new .about-hero{margin-bottom:1.8rem}
 .tdp-about-new .adventure{margin-top:2rem}
 .tdp-gift-guide > .tdp-gift-nav{margin-block:1.4rem 1.95rem}
 .tdp-gift-guide .tdp-gift-grid{gap:1.15rem}
 #upcoming-events.tdp-event-agenda{border-top:0;padding-top:0;margin-top:2rem;margin-bottom:1.55rem}
}
@media(max-width:500px){
 body #tdp-jr .jr-topic-buttons .jr-topic-button .wp-block-button__link{
  display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;
  text-align:left;gap:.55rem!important;min-height:58px;padding:.7rem .62rem!important;
 }
 body #tdp-jr .jr-topic-buttons .jr-topic-button .wp-block-button__link::before{
  width:24px!important;height:24px!important;flex:0 0 24px!important;margin:0!important;
 }
 body #tdp-od .od-topics-grid>a{padding:.8rem!important}
 body #tdp-od .od-topics-grid>a:last-child:nth-child(odd){grid-column:1/-1;flex-direction:row;align-items:center!important;gap:.85rem}
}
