/* Darwin Under Siege on phones (magazine_basic theme). Desktop is untouched. */
@media (max-width: 767px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { width: auto !important; min-width: 0; margin: 0 !important; padding: 0 !important; overflow-wrap: break-word; }
  #header > :not(#navigation), #mainwrapper { padding-left: 14px !important; padding-right: 14px !important; box-sizing: border-box; }
  img, iframe, video, embed, object { max-width: 100% !important; height: auto; }
  iframe[src*="youtube"], iframe[src*="vimeo"] { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
  input, select, textarea { max-width: 100%; box-sizing: border-box; font-size: 16px; }
  table { max-width: 100%; }

  /* header: banner, title, tagline stacked */
  #header { float: none; width: auto; display: flex; flex-direction: column; }
  #headerad { float: none !important; order: -1; margin: 12px 0 0 !important; text-align: center; width: auto; }
  #title, #description { float: none !important; clear: none !important; width: auto; text-align: left; }
  #title { margin-top: 10px; }
  #title a { font-size: 34px; line-height: 1.15; }
  #description { margin-top: 6px; line-height: 1.4; }

  /* category menu: a "Menu" button opens it (mobile.js); sub-categories listed under their parent */
  #navigation { float: none; width: auto; margin-top: 14px; background-color: #3b3b3b; background-repeat: repeat-x; } /* the theme stripe image only along the top */
  .js #navigation > ul { display: none; }
  .js #navigation.m-open > ul { display: block; }
  #navigation ul li { float: none; line-height: 1.3; }
  #navigation ul a { padding: 11px 14px; border-right: 0; border-top: 1px solid rgba(255, 255, 255, .25); font-size: 14px; }
  #navigation ul ul { position: static; display: block; background: none; }
  #navigation ul ul li { width: auto; border: 0; }
  #navigation ul ul li a { padding: 9px 14px 9px 30px; color: #fff; background: none; font-size: 13px; font-weight: normal; }
  .m-menu-btn {
    display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 12px 14px; border: 0; cursor: pointer;
    font: bold 15px/1.2 Verdana, Arial, Helvetica, sans-serif; color: #fff; background: transparent; text-align: left;
  }
  .m-menu-btn::before { content: ""; width: 20px; height: 14px; flex: none;
    background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat,
                linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
                linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }

  /* page links (Contact, About ...) wrap onto several lines */
  #sub-navigation { float: none; width: auto; padding: 6px 0; }
  #sub-navigation ul { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; }
  #sub-navigation li { float: none; line-height: 1.5; padding: 0; background: none; }
  #sub-navigation a { padding: 0; }
  #sub-navigation li.right-d { display: none; }

  /* posts first, then the sidebar (mailing list, newsletter, conferences, archives) */
  #mainwrapper { float: none; width: auto !important; display: flex; flex-direction: column; }
  #leftcontent, #twocol, #threecol, #threecol2, .commentlist { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
  #leftcontent img { max-width: 100% !important; }
  #sidebar, #secondsidebar { float: none !important; order: 2; width: auto !important; margin: 24px 0 0 !important; padding: 0 !important; }
  #sidebar .side-widget, #secondsidebar .side-widget { width: auto !important; float: none; box-sizing: border-box; }
  .posts, .post, .entry, .pages { float: none !important; width: auto !important; }
  .posts .entry img.alignleft, .posts img[align="left"] { max-width: 34% !important; }
  .post h1, h1.catheader { font-size: 24px; line-height: 1.25; }
  .alignright, .alignleft, img[align], .entry img[style*="float"] { max-width: 40% !important; }
  .aligncenter, .wp-caption { max-width: 100% !important; height: auto; }
  .wp-caption { box-sizing: border-box; }
  #footer { float: none; width: auto; }
  .fb-like { max-width: 100%; overflow: hidden; }
}
